hechoendrupal / drupal-console

The Drupal CLI. A tool to generate boilerplate code, interact with and debug Drupal.
http://drupalconsole.com
GNU General Public License v2.0
939 stars 559 forks source link

TypeError: Argument 1 passed to Drupal\Console\Command\Migrate\RollBackCommand::__construct() must be an instance of Drupal\migrate\Plugin\MigrationPluginManagerInterface, null given #4005

Open hejiann opened 5 years ago

hejiann commented 5 years ago

Running drupal console will got this issue:

root@2295b3ef7c0f:/var/www/html(eabax)# vendor/bin/drupal
console.database_log_poll - Plugin (language) instance class "\Drupal\language\DefaultLanguageItem" does not exist.
TypeError: Argument 1 passed to Drupal\Console\Command\Migrate\RollBackCommand::__construct() must be an instance of Drupal\migrate\Plugin\MigrationPluginManagerInterface, null given in /var/www/html/vendor/drupal/console/src/Command/Migrate/RollBackCommand.php on line 43 #0 [internal function]: Drupal\Console\Command\Migrate\RollBackCommand->__construct(NULL)
#1 /var/www/html/vendor/symfony/dependency-injection/ContainerBuilder.php(1169): ReflectionClass->newInstanceArgs(Array)
#2 /var/www/html/vendor/symfony/dependency-injection/ContainerBuilder.php(633): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, true, 'console.migrate...')
#3 /var/www/html/vendor/symfony/dependency-injection/ContainerBuilder.php(587): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('console.migrate...', 1)
#4 /var/www/html/vendor/drupal/console-core/src/Application.php(441): Symfony\Component\DependencyInjection\ContainerBuilder->get('console.migrate...')
#5 /var/www/html/vendor/drupal/console-core/src/Application.php(211): Drupal\Console\Core\Application->registerCommands()
#6 /var/www/html/vendor/drupal/console-core/src/Application.php(116): Drupal\Console\Core\Application->loadCommands()
#7 /var/www/html/vendor/drupal/console/src/Application.php(64): Drupal\Console\Core\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/vendor/symfony/console/Application.php(148): Drupal\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/vendor/drupal/console/bin/drupal.php(89): Symfony\Component\Console\Application->run()
#10 /var/www/html/vendor/drupal/console/bin/drupal(4): require('/var/www/html/v...')
#11 {main}
TypeError: Argument 1 passed to Drupal\Console\Command\Migrate\RollBackCommand::__construct() must be an instance of Drupal\migrate\Plugin\MigrationPluginManagerInterface, null given in Drupal\Console\Command\Migrate\RollBackCommand->__construct() (line 43 of /var/www/html/vendor/drupal/console/src/Command/Migrate/RollBackCommand.php).

Drupal version: 8.7.x

hejiann commented 5 years ago

It seems this issue is caused by cache. Change settings.php setup the cache to memcache will cause this issue. "drush cr" will fix this issue. So, drush will work correct after cache changed, but drupal console not.

vorapoap commented 5 years ago

Not working too.. have reset memcached/drush cr..