How can I rebuild (automatically) the modules sequence stored in
app/etc/config.php in Magento 2.
I have 2 modules I'm working on.
I installed them in the order "Module 1", "Module 2".
So in my
app/etc/config.php they appear at the bottom like this:
'Magento_Wishlist' => 1, //core module 'Namespace_Module1' => 1, //my first module 'Namespace_Module2' => 1, //my second module
But after I installed both of them, I realized that Module2 must be loaded before Module1 so that some config settings from Module 2 can be overwritten through Module 1. (don't ask why, just bear with me).
So I edited the
etc/module.xml file of "Module1" and added the "Module 2" inside the
But that has no effect, because the list of modules from
config.php remains the same.
Is there a way to rebuild the sequence from
config.php? I know that for 2 modules it should be easy because I can just edit it manually, but I'm curious if there is an automated way of doing it, in case I will need it in the future.