-
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
Adds module:config:status command which checks if the module config i… #22733
Adds module:config:status command which checks if the module config i… #22733
Conversation
Hi @hostep. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
setup/src/Magento/Setup/Console/Command/ModuleConfigStatusCommand.php
Outdated
Show resolved
Hide resolved
setup/src/Magento/Setup/Console/Command/ModuleConfigStatusCommand.php
Outdated
Show resolved
Hide resolved
8a3ec61
to
8b9d156
Compare
@dmytro-ch: I've force pushed the requested changes. |
Hi @dmytro-ch, thank you for the review. |
@hostep thank you! |
✔️ QA passed |
Thanks for the cleanup @nmalevanec! I'm curious which command you ran to detect these problems, so the next time I can try to fix these myself when creating a new PR. |
Hi, @hostep. You can just run dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php test against modified php files. |
@piotrekkaminski can you please take a look at this feature and provide your feedback |
@magento run all tests |
@sivaschenko: is it ok if I still update my PR? There are some missing I'll then also do some git rebasing of this PR on top of the latest 2.3-develop, maybe that helps with these tests which seem to be not running somehow. I also still don't understand how to execute static tests on my local, the Thanks! |
…n the app/etc/config.php file is correct or not.
60af850
to
50e2f31
Compare
Rebased PR on latest 2.3-develop branch and added |
@magento run all tests |
50e2f31
to
d510642
Compare
Force pushed again, which will hopefully satisfy the static tests (I've amended @nmalevanec's commit for this, as not to loose his authorship of the other fixes). It would still be great if somebody can tell me how to execute these static tests on my local environment, so I don't have to wait 2 days for the results and can just fix them in one go, thanks! 🙂 |
Hi @hostep, thank you for your contribution! |
…n the app/etc/config.php file is correct or not.
Description (*)
This adds a new command to
bin/magento
:module:config:status
.This command checks if the modules in the file
app/etc/config.php
are correct or not.I've created this command since I'm getting a bit tired of seeing incorrect
app/etc/config.php
files being added to our git repo's whenever somebody adds a new module using composer and forgets to runbin/magento setup:upgrade
, or when some branch get merged which has merge conflicts in theconfig.php
file and the conflict gets solved incorrectly.Having this new command, would allow us to have a pre-commit githook which can check for this problem and then tell the developer to fix the
config.php
file before committing.Feel free to let me know if the command name or description needs to be changed. And also if the output messages need to be changed.
Fixed Issues (if relevant)
None that I could find.
Manual testing scenarios (*)
bin/magento module:config:status
, it should say:The modules configuration is up to date.
app/etc/config.php
and remove or add a module. Or just switch the sort order of 2 modules.bin/magento module:config:status
, it should say:The modules configuration in the 'app/etc/config.php' file is outdated. Run 'setup:upgrade' to fix it.
bin/magento setup:upgrade
bin/magento module:config:status
, it should say:The modules configuration is up to date.
Contribution checklist (*)