Problem/Motivation
ArgumentCountError : Too few arguments to function Drupal\entity_usage\EntityUsageBatchManager::__construct(), 3 passed in /var/www/3src/src/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 261 and exactly 4 expected dans Drupal\entity_usage\EntityUsageBatchManager->__construct() (/var/www/3src/src/web/modules/contrib/entity_usage/src/EntityUsageBatchManager.php ligne 53)
#0 /var/www/3src/src/web/core/lib/Drupal/Component/DependencyInjection/Container.php(261): Drupal\entity_usage\EntityUsageBatchManager->__construct()
#1 /var/www/3src/src/web/core/lib/Drupal/Component/DependencyInjection/Container.php(179): Drupal\Component\DependencyInjection\Container->createService()
#2 /var/www/3src/src/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(289): Drupal\Component\DependencyInjection\Container->get()
#3 /var/www/3src/src/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(253): Drush\Runtime\LegacyServiceInstantiator->resolveFromContainer()
#4 [internal function]: Drush\Runtime\LegacyServiceInstantiator->resolveArgument()
#5 /var/www/3src/src/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(223): array_map()
#6 /var/www/3src/src/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(193): Drush\Runtime\LegacyServiceInstantiator->resolveArguments()
#7 /var/www/3src/src/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(167): Drush\Runtime\LegacyServiceInstantiator->instantiateObject()
#8 /var/www/3src/src/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(117): Drush\Runtime\LegacyServiceInstantiator->create()
#9 /var/www/3src/src/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(54): Drush\Runtime\LegacyServiceInstantiator->instantiateServices()
#10 /var/www/3src/src/vendor/drush/drush/src/Boot/DrupalBoot8.php(242): Drush\Runtime\LegacyServiceInstantiator->loadServiceFiles()
#11 /var/www/3src/src/vendor/drush/drush/src/Boot/DrupalBoot8.php(218): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands()
#12 /var/www/3src/src/vendor/drush/drush/src/Boot/BootstrapManager.php(211): Drush\Boot\DrupalBoot8->bootstrapDrupalFull()
#13 /var/www/3src/src/vendor/drush/drush/src/Boot/BootstrapManager.php(397): Drush\Boot\BootstrapManager->doBootstrap()
#14 /var/www/3src/src/vendor/drush/drush/src/Application.php(219): Drush\Boot\BootstrapManager->bootstrapMax()
#15 /var/www/3src/src/vendor/drush/drush/src/Application.php(185): Drush\Application->bootstrapAndFind()
#16 /var/www/3src/src/vendor/symfony/console/Application.php(266): Drush\Application->find()
#17 /var/www/3src/src/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#18 /var/www/3src/src/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run()
#19 /var/www/3src/src/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()
#20 /var/www/3src/src/vendor/drush/drush/drush.php(140): Drush\Runtime\Runtime->run()
#21 /var/www/3src/src/vendor/bin/drush.php(119): include('...')
#22 {main}
Steps to reproduce
upgrading entity_usage from beta 17 to beta 18
Proposed resolution
Make the new argument optional, and instantiate it inside the constructor if not passed in.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork entity_usage-3506961
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
pastamp commentedComment #3
pastamp commentedComment #4
marcoscanoYeah this will happen on sites where the build workflow doesn't start with a
drush cache:rebuild.I'll put together a MR to try to avoid that.
Comment #6
marcoscanoComment #7
alexpottLooks good to me.
Comment #9
marcoscanoThanks all!
Merged and tagged https://www.drupal.org/project/entity_usage/releases/8.x-2.0-beta19 with this.