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
Dependency checker does not work properly when enabling modules #38600
base: 2.4-develop
Are you sure you want to change the base?
Dependency checker does not work properly when enabling modules #38600
Conversation
DependencyChecker needs to use a PackageInfo instance that uses FullModuleList (as already done at \Magento\Framework\Module\ConflictChecker::__construct) in order to work, so use \Magento\Framework\Module\PackageInfoFactory::create which creates instance properly
Hi @adrian-martinez-onestic. Thank you for your contribution! Add the comment under your pull request to deploy test or vanilla Magento instance:
❗ Automated tests can be triggered manually with an appropriate comment:
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento create issue |
@magento run all tests |
@magento run Unit Tests |
@magento run all tests |
@magento run all tests |
Description (*)
Enabling / disabling modules is prepared to avoid leaving modules status in a inconsistent state, regarding its dependencies declared in composer.json, so:
Given
Module_A
andModule_B
, and a declared relation ofModule_B
=>Module_A
, I should not be able to enableModule_B
without enablingModule_A
, but I am:Technical Details
DependencyChecker
needs to use aPackageInfo
instance that usesFullModuleList
(as already done atConflictChecker::__construct
) in order to work, so constructor is changed to usePackageInfoFactory::create()
implementation which creates PackageInfo instance withFullModuleList
embedded (instead of standardModuleList
).Related Pull Requests
None AFAIK.
Fixed Issues (if relevant)
None AFAIK.
Manual testing scenarios (*)
Module_A
andModule_B
; onlyregistration.php
,module.xml
andcomposer.json
files are required.Before the change:
After the change:
The other case keeps working:
Questions or comments
Contribution checklist (*)
Resolved issues: