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

Alter Compile function to work with M2 >=2.1 #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

waynetheisinger
Copy link

The release of Magento 2.1.0 removed setup:di:compile-multi-tenant. As we haven't initiated Magento in this script we can't check its version number. To get round this I've put in some error handling. First we try multi-tenant complilation and if that fails we catch as we are greater or equal to 2.1 and use setup:di:compile.

The release of Magento 2.1.0 removed setup:di:compile-multi-tenant. As we haven't initiated Magento in this script we can't check its version number. To get round this I've put in some error handling. First we try multi-tenant complilation and if that fails we catch as we are greater or equal to 2.1 and use setup:di:compile.
@ceer
Copy link

ceer commented Sep 13, 2016

I had to call $this->execute("php bin/magento setup:di:compile"); only. The fail test gave me the error:

[InvalidArgumentException]
Command "setup:di:compile-multi-tenant" is not defined. 

@waynetheisinger
Copy link
Author

even though that echo's to the console - didn't the catch block also fire?

@waynetheisinger
Copy link
Author

thinking about it - it was a runtime exception on my set-up but maybe that's too specific - maybe the catch block should just be for a standard exception...

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

Successfully merging this pull request may close these issues.

None yet

2 participants