-
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
Console command can break setup #16173
Comments
@FreekVandeursen Think a proxy should be used instead of the product repository interface to avoid a dependency trying to read the 'website' table. |
@will-b I agree with you that there are ways of working around this problem. I wonder though if the current behaviour is intended. I think there are 2 ways of looking at this:
|
@FreekVandeursen, thank you for your report. As your module dependent on catalog module, you need to specify dependency for you module: https://devdocs.magento.com/guides/v2.2/extension-dev-guide/build/module-load-order.html |
@engcom-backlog-nickolas I did specify a dependency in my module.xml, that doesn't solve the problem. |
@FreekVandeursen , thank you for your feedback. |
@FreekVandeursen @engcom-backlog-nazar possible that it was duplicated in #21752 which is closed due to #21693 |
Hello @FreekVandeursen Thank you for contribution and collaboration! We are not able to reproduce this issue on the lates We are closing this issue due to branch If you still faced this issue on |
Preconditions
Steps to reproduce
Expected result
Actual result
Analysis
The root cause seems to be in the
Magento\Setup\Model\ObjectManagerProvider
class, which callscreateCliCommands
in it'sget
function. This will break setup when there are any console commands that depend on the database to exist already. I have seen this happen with the ProductRepository for example.What is the reason for this createCliCommands call? If I just disable that call, the setup will complete succesfully.
It also seems strange that this call is only present in the CLI SAPI, which means functionality is different between CLI or web installation.
Example
The text was updated successfully, but these errors were encountered: