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

Running "setup:upgrade" in production mode results in PHP fatal error #19

Open
erikhansen opened this issue Sep 8, 2017 · 2 comments
Open
Assignees
Labels

Comments

@erikhansen
Copy link

I've installed the extension and it works fine on a local environment, but when I deploy the extension to a stage environment (that is running in production mode), I get this error when running bin/magento setup:upgrade:

Module 'Magento_Integration':
Module 'Magento_SendFriend':
Module 'Magento_Shipping':
Module 'Magento_Sitemap':
Module 'Magento_Solr':
Module 'Magento_CatalogInventoryStaging':
Module 'Diglin_Username':
magento stderr: PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Magento\Setup\Module\DataSetup::__construct() must be an instance of Magento\Framework\Module\Setup\Context, instance of Magento\Framework\ObjectManager\ObjectManager given, called in /var/www/stage/releases/20170908220834/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93 and defined in /var/www/stage/releases/20170908220834/setup/src/Magento/Setup/Module/DataSetup.php:57
Stack trace:
#0 /var/www/stage/releases/20170908220834/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): Magento\Setup\Module\DataSetup->__construct(Object(Magento\Framework\ObjectManager\ObjectManager))
#1 /var/www/stage/releases/20170908220834/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Setup\\M...', Array)
#2 /var/www/stage/releases/20170908220834/vendor/magento/framework/ObjectManager/Factory/Compiled.php(130): Magento\Framework\ObjectManager\Factor in /var/www/stage/releases/20170908220834/setup/src/Magento/Setup/Module/DataSetup.php on line 57

This issue appears to be caused by the \Diglin\Username\Setup\InstallData::install and \Diglin\Username\Setup\InstallSchema::install methods requiring instances of the \Magento\Framework\Setup\ModuleDataSetupInterface and \Magento\Framework\Setup\SchemaSetupInterface interfaces. I'm not sure why this is causing an error, as it's the same pattern that native Magento Setup classes use.

Have you seen this issue and do you happen to know what the resolution of it is?

@sylvainraye
Copy link
Collaborator

Hi

honestly no. Which Magento version did you used ?

@erikhansen
Copy link
Author

This was on Magento 2.1.9, I believe.

@sylvainraye sylvainraye self-assigned this Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants