-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Add argument on app:config:dump to skip dumping all system settings. #12410
Add argument on app:config:dump to skip dumping all system settings. #12410
Conversation
Related PRs suggesting improvements in same area:
This PR will also fix this issue: |
…allows to dump only scope and theme while skipping system for easier maintainability.
7464ffd
to
3202e94
Compare
Thanks for your contribution @jalogut! Can you check the failing tests please? Most of them failed asserting that two strings are equal plus the code sniffer has some suggestions for the new code. |
Hi @miguelbalparda Thanks for noticing. I hope it's ok now. |
I'll check internally and report back. In the meantime can you check https://travis-ci.org/magento/magento2/jobs/307090461? |
@miguelbalparda perfect! I just fixed the issue |
Hey @jalogut and @miguelbalparda the rule of thumb at the moment is new features to 2.3 |
@jalogut can you edit the PR and point it to 2.3 instead of 2.2? We can consider backports later too. |
#12441 was just merged into 2.2. Imho this feature addresses exactly same issues that make not possible to use the new deployment pipeline added in 2.2. If the other PR was merged, it would make sense to merge that one too. |
Hi, any updates on this PR? Do you think this feature will be merged anytime soon? |
Hi @miguelbalparda @dmanners , as @jalogut ask. Could we expect this feature in 2.2? |
This is probably not going to be included in the next release, which is 2.3 at this point. I'll check internally and have this one reassigned. Thanks for the wait! |
Hi @jalogut , I'm processing this PR now, it would be great if you create additional PR to devdocs repository with information about new features. |
Hi @jalogut. Thank you for your contribution. |
@magento-engcom-team it seems this PR was not included in 2.2.5 as mentioned on your last comment. Do you know what happened? |
Sorry @jalogut this was a problem with the bot configuration. It was using the wrong date for the cut-off point for pull requests getting into the 2.2.5 release. This PR should make it into the 2.2.6 release instead. Sorry for the inconvenience. |
Description
Add option
config-types
onapp:config:dump
to skip dumping all system settings. That allows to dump onlyscope
,theme
for easier maintainability.Fixed Issues
When using
app:config:dump
in real projects, we normally do not want to dump all thousandscore_config_data
settings into config files. That makes the files difficult to read and maintain. Imho dumpingscopes
andthemes
makes a lot of sense. However, the system settings should be kept small and simple. They must be progressively added according to project needs.On the other hand, the main purpose of
config.php
is to propagate configuration that must be same in all environments, specially forPRD
andBuild
systems. These settings should be just a few, like for examplecss
andjs
configuration needed forsetup:static-content:deploy
. Of course others settings might be needed depending on the project but all the others are better managed intocore_config_data
table or by using setup scripts.This new option
config-types
makes possible to dumpscopes
andthemes
automatically (needed for build system) while managing system settings manually usingconfig:set --lock-config
as requested in PR:It also fixes this issue:
Manual testing scenarios
Example of workflow on a real project:
When creating the project we dump all settings with
app:config:dump scopes themes
That creates the needed settings for
scopes
andthemes
but skipssystem
core config dataWe also add shared settings needed for
PRD
andBuild
environmentsAs project evolves, we add a new stores and themes, so we need to update our
config.php
settings.At the same time, if we ever need to
share
system settings on all environments, we can use the commandbin/magento config:set --lock-config
without needing to dump all hundreds of settings into theconfig.php
Contribution checklist