Problem/Motivation
After upgrading from Raven 4.0.22 to 5.0.1, a ArgumentCountError appears when running drush updb
.
Is this a known bug, or is Raven ^5.0 not compatible with Drush 11, because Drush is EOL?
ArgumentCountError: Too few arguments to function Drupal\raven\Drush\Commands\RavenCommands::create(), 1 passed in /var/www/vendor/drush/drush/src/Boot/DrupalBoot8.php on line 325 and exactly 2 expected in /var/www/docroot/modules/contrib/raven/src/Drush/Commands/RavenCommands.php on line 46 #0 /var/www/vendor/drush/drush/src/Boot/DrupalBoot8.php(325): Drupal\raven\Drush\Commands\RavenCommands::create(Object(Drupal\Core\DependencyInjection\ContainerBuilder))
#1 /var/www/vendor/drush/drush/src/Boot/DrupalBoot8.php(253): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands(Object(Drush\Boot\BootstrapManager))
#2 /var/www/vendor/drush/drush/src/Boot/BootstrapManager.php(291): Drush\Boot\DrupalBoot8->bootstrapDrupalFull(Object(Drush\Boot\BootstrapManager), Object(Consolidation\AnnotatedCommand\AnnotationData))
#3 /var/www/vendor/drush/drush/src/Boot/BootstrapManager.php(432): Drush\Boot\BootstrapManager->doBootstrap(5, 5, Object(Consolidation\AnnotatedCommand\AnnotationData))
#4 /var/www/vendor/drush/drush/src/Boot/BootstrapManager.php(384): Drush\Boot\BootstrapManager->bootstrapToPhaseIndex(5, Object(Consolidation\AnnotatedCommand\AnnotationData))
#5 /var/www/vendor/drush/drush/src/Boot/BootstrapHook.php(32): Drush\Boot\BootstrapManager->bootstrapToPhase('full', Object(Consolidation\AnnotatedCommand\AnnotationData))
#6 /var/www/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(44): Drush\Boot\BootstrapHook->initialize(Object(Symfony\Component\Console\Input\ArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#7 /var/www/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(36): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->doInitializeHook(Object(Drush\Boot\BootstrapHook), Object(Symfony\Component\Console\Input\ArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#8 /var/www/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(29): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->callInitializeHook(Object(Drush\Boot\BootstrapHook), Object(Symfony\Component\Console\Input\ArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#9 /var/www/vendor/consolidation/annotated-command/src/CommandProcessor.php(145): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize(Object(Symfony\Component\Console\Input\ArgvInput), Object(Consolidation\AnnotatedCommand\AnnotationData))
#10 /var/www/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(376): Consolidation\AnnotatedCommand\CommandProcessor->initializeHook(Object(Symfony\Component\Console\Input\ArgvInput), Array, Object(Consolidation\AnnotatedCommand\AnnotationData))
#11 /var/www/vendor/symfony/console/Command/Command.php(292): Consolidation\AnnotatedCommand\AnnotatedCommand->initialize(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/vendor/symfony/console/Application.php(1081): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/vendor/symfony/console/Application.php(320): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/vendor/symfony/console/Application.php(174): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/vendor/drush/drush/src/Runtime/Runtime.php(124): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/vendor/drush/drush/src/Runtime/Runtime.php(51): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/vendor/drush/drush/drush.php(79): Drush\Runtime\Runtime->run(Array)
#18 /var/www/vendor/drush/drush/includes/preflight.inc(18): require('/var/www/vendor...')
#19 phar:///usr/local/bin/drush/bin/drush.php(143): drush_main()
#20 /usr/local/bin/drush(14): require('phar:///usr/loc...')
#21 {main}
ArgumentCountError: Too few arguments to function Drupal\raven\Drush\Commands\RavenCommands::create(), 1 passed in /var/www/vendor/drush/drush/src/Boot/DrupalBoot8.php on line 325 and exactly 2 expected in Drupal\raven\Drush\Commands\RavenCommands::create() (line 46 of /var/www/docroot/modules/contrib/raven/src/Drush/Commands/RavenCommands.php).
Steps to reproduce
Using Drush 11.6.0 and Drupal core 10.1.6.
- Update to raven 5.0.1:
composer require drupal/raven:^5.0 -W
- Try to update the database with
drush updb-y
Proposed resolution
Either:
1. Mark raven ^5.0 as not compatible with Drush version 11 and before by adding the following to the composer.json:
"conflict": {
"drush/drush": "<12"
},
2. Correct the issue with the drush command.
Remaining tasks
User interface changes
API changes
Data model changes