Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch development config to use ConfigAggregator #122

Open
wants to merge 3 commits into
base: 3.16.x
Choose a base branch
from

Conversation

kynx
Copy link

@kynx kynx commented Mar 10, 2023

Q A
Documentation no
Bugfix no
BC Break no
New Feature yes
RFC no
QA no

Description

This PR changes development.config.php.dist to use a ConfigAggregator so laminas/laminas-component-installer#68 can inject --dev-only config providers. It also adds the ability to load dev-only configuration from {,*.}{global,local}-development.php files - like MVC does - so settings in the development config providers can be overridden.

I'm not sure what I can do to test these changes. As far as I can tell the existing tests don't cover the structure of the config files, but if anyone's got any pointers...

@froschdesign froschdesign added the Enhancement New feature or request label Mar 13, 2023
Copy link
Member

@Xerkus Xerkus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think naming for autoloaded files would be better if shortened a bit.

Local dev configs need to be added to gitignore same as regular local config files.

config/autoload/development.local.php.dist Outdated Show resolved Hide resolved
config/development.config.php.dist Outdated Show resolved Hide resolved
@kynx kynx force-pushed the development-config-aggregator branch from 4d447d1 to cb85ca5 Compare February 14, 2024 20:11
@Xerkus
Copy link
Member

Xerkus commented Feb 15, 2024

You might want to rebase

matt added 3 commits February 15, 2024 11:02
Signed-off-by: matt <matt@claritum.com>
Signed-off-by: matt <matt@claritum.com>
Signed-off-by: matt <matt@claritum.com>
@kynx kynx force-pushed the development-config-aggregator branch from cb85ca5 to e404ba9 Compare February 15, 2024 11:03
@kynx kynx changed the base branch from 3.14.x to 3.16.x February 15, 2024 11:04
@kynx
Copy link
Author

kynx commented Feb 15, 2024

Grrr.... done.

@kynx
Copy link
Author

kynx commented Feb 24, 2024

Hey @Xerkus I ended up using global.dev.php.dist instead of local.dev.php.dist - I think that's better for project-wide developer settings that get checked in to VCS.

@alexmerlin
Copy link
Member

@kynx Do you plan to continue working on this?

@kynx
Copy link
Author

kynx commented Dec 7, 2024

@alexmerlin Yeah, checks are passing - remind me, what do I need to do?

@gsteel
Copy link
Member

gsteel commented Dec 8, 2024

I think this should use "local" in the filename - the *.dist files gets checked in to VCS and convention is that *.global.* is not ignored in .gitignore whereas *.local.* is ignored - naming the file whatever.global.whatever means that when dev mode is enabled, users may end up checking in the enabled dev config, which is likely not what we want.

(And/or) The .gitignore in config/autoload probably needs updating too to exclude the dev override files: https://github.com/mezzio/mezzio-skeleton/blob/3.16.x/config/autoload/.gitignore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants