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

New command for regenerating module sequence in config.php #483

Open
pocallaghan opened this issue Aug 23, 2019 · 5 comments
Open

New command for regenerating module sequence in config.php #483

pocallaghan opened this issue Aug 23, 2019 · 5 comments

Comments

@pocallaghan
Copy link
Contributor

Due to the dependency resolution between extensions, enabling a new extension can result in the modules node of the config.php file to shift order each time a new extension is added. This can be a bit painful when rebasing / merging because it's very hard to understand what the differences really are. Currently the easiest way to resolve that is to simply checkout either --ours or --theirs and run setup:upgrade which re-generates the module list correctly for the currently checked out code. Since setup:upgrade also performs database migrations, this is far from ideal.

If I were to create a command solely for regenerating the module list, would you be interested in including it in n98 core or should I develop it as a plugin?

@cmuench
Copy link
Member

cmuench commented Aug 23, 2019

@pocallaghan Yes, great idea.

@cmuench
Copy link
Member

cmuench commented Jan 21, 2023

@pocallaghan that would be handy as command included in n98-magerun

@hostep
Copy link
Contributor

hostep commented Jan 23, 2023

@cmuench
Copy link
Member

cmuench commented Jan 23, 2023

You'd probably just want to call https://github.com/hostep/magento2/blob/d51064293f640cd9d823410fee93590aa4e79a72/setup/src/Magento/Setup/Model/Installer.php#L1179-L1201 to get this working, just FYI.

Could be a simple but useful command.

@cmuench
Copy link
Member

cmuench commented Jan 24, 2023

Just created a first WIP version.
Sadly the Installer class cannot be created without any issues.
The logic is part of the setup are which has another different init process.

Currently I see an error if I try to create the object.

Cannot instantiate interface Laminas\ServiceManager\ServiceLocatorInterface

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

No branches or pull requests

3 participants