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

Command icon 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

pastamp created an issue. See original summary.

pastamp’s picture

Issue summary: View changes
pastamp’s picture

Status: Active » Closed (cannot reproduce)
marcoscano’s picture

Assigned: Unassigned » marcoscano
Status: Closed (cannot reproduce) » Active

Yeah 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.

marcoscano’s picture

Title: upgrading beta17 to beta 18 too few element _construct » Constructor signature change needs BC check
Version: 8.x-2.0-beta18 » 8.x-2.x-dev
Assigned: marcoscano » Unassigned
Issue summary: View changes
Status: Active » Needs review
alexpott’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

  • marcoscano committed 61fc9623 on 8.x-2.x
    Issue #3506961 by marcoscano, pastamp, alexpott: Constructor signature...
marcoscano’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.