magento2: command setup/upgrade not working
The CLI commands were working fine till the last time i used, but today when i try to run
php bin/magento setup:upgrade
It is not working, i am receiving an exception instead.
Preconditions
- PHP 7.0.13
- MySQL 5.6.34
- Magento V 2.1.2
- nginx
Steps to reproduce
- ran the cli command
php bin/magento setup:upgrade
Expected result
- Should update the modules.
Actual result
Fatal error: Uncaught TypeError: Argument 3 passed to Magento\Framework\Model\ResourceModel\Type\Db\Pdo\Mysql::__construct() must be an instance of Magento\Framework\DB\SelectFactory, array given, called in /public_html/setup/src/Magento/Setup/Module/ConnectionFactory.php on line 36 and defined in /public_html/vendor/magento/framework/Model/ResourceModel/Type/Db/Pdo/Mysql.php:44 Stack trace: #0 /public_html/setup/src/Magento/Setup/Module/ConnectionFactory.php(36): Magento\Framework\Model\ResourceModel\Type\Db\Pdo\Mysql->__construct(Object(Magento\Framework\Stdlib\StringUtils), Object(Magento\Framework\Stdlib\DateTime), Array) #1 /public_html/vendor/magento/framework/App/ResourceConnection.php(113): Magento\Setup\Module\ConnectionFactory->create(Array) #2 /public_html/vendor/magento/framework/App/ResourceConnection.php(92): Magento\Framework\App\ResourceConnection->getConnectionByName('default') #3 /public_html/vendor/magento/framework/Module/Set in /public_html/vendor/magento/framework/Model/ResourceModel/Type/Db/Pdo/Mysql.php on line 44
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (2 by maintainers)
Most of the “Argument passed” errors in M2 are caused by the
var/generationfolder not being up to date. Did you try to flush this folder ?