Problem/Motivation
While upgrading from 4.0.3 to the latest version, running into this error while running Drush updb -y
Full stack:
[error] TypeError: Drupal\smart_date_recur\Drush\Commands\SmartDateRecurCommands::__construct(): Argument #2 ($entityTypeManager) must be of type Drupal\Core\Entity\EntityTypeManagerInterface, Drupal\smart_date_recur\SmartDateRecurManager given, called in /var/www/web/modules/contrib/smart_date/modules/smart_date_recur/src/Drush/Commands/SmartDateRecurCommands.php on line 39 in Drupal\smart_date_recur\Drush\Commands\SmartDateRecurCommands->__construct() (line 27 of /var/www/web/modules/contrib/smart_date/modules/smart_date_recur/src/Drush/Commands/SmartDateRecurCommands.php) #0 /var/www/web/modules/contrib/smart_date/modules/smart_date_recur/src/Drush/Commands/SmartDateRecurCommands.php(39): Drupal\smart_date_recur\Drush\Commands\SmartDateRecurCommands->__construct(Object(Drupal\eca\Token\ContribToken), Object(Drupal\smart_date_recur\SmartDateRecurManager))
#1 /var/www/vendor/drush/drush/src/Boot/DrupalBoot8.php(325): Drupal\smart_date_recur\Drush\Commands\SmartDateRecurCommands::create(Object(Drupal\Core\DependencyInjection\ContainerBuilder))
#2 /var/www/vendor/drush/drush/src/Boot/DrupalBoot8.php(253): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands(Object(Drush\Boot\BootstrapManager))
#3 /var/www/vendor/drush/drush/src/Boot/BootstrapManager.php(291): Drush\Boot\DrupalBoot8->bootstrapDrupalFull(Object(Drush\Boot\BootstrapManager), Object(Consolidation\AnnotatedCommand\AnnotationData))
#4 /var/www/vendor/drush/drush/src/Boot/BootstrapManager.php(432): Drush\Boot\BootstrapManager->doBootstrap(5, 5, Object(Consolidation\AnnotatedCommand\AnnotationData))
#5 /var/www/vendor/drush/drush/src/Boot/BootstrapManager.php(384): Drush\Boot\BootstrapManager->bootstrapToPhaseIndex(5, Object(Consolidation\AnnotatedCommand\AnnotationData))
#6 /var/www/vendor/drush/drush/src/Boot/BootstrapHook.php(32): Drush\Boot\BootstrapManager->bootstrapToPhase('full', Object(Consolidation\AnnotatedCommand\AnnotationData))
#7 /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))
#8 /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))
#9 /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))
#10 /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))
#11 /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))
#12 /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))
#13 /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))
#14 /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))
#15 /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))
#16 /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))
#17 /var/www/vendor/drush/drush/src/Runtime/Runtime.php(51): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/vendor/drush/drush/drush.php(79): Drush\Runtime\Runtime->run(Array)
#19 /var/www/vendor/drush/drush/drush(4): require('/var/www/vendor...')
#20 /var/www/vendor/bin/drush(119): include('/var/www/vendor...')
#21 {main}.
TypeError: Drupal\smart_date_recur\Drush\Commands\SmartDateRecurCommands::__construct(): Argument #2 ($entityTypeManager) must be of type Drupal\Core\Entity\EntityTypeManagerInterface, Drupal\smart_date_recur\SmartDateRecurManager given, called in /var/www/web/modules/contrib/smart_date/modules/smart_date_recur/src/Drush/Commands/SmartDateRecurCommands.php on line 39 in /var/www/web/modules/contrib/smart_date/modules/smart_date_recur/src/Drush/Commands/SmartDateRecurCommands.php on line 27 #0 /var/www/web/modules/contrib/smart_date/modules/smart_date_recur/src/Drush/Commands/SmartDateRecurCommands.php(39): Drupal\smart_date_recur\Drush\Commands\SmartDateRecurCommands->__construct(Object(Drupal\eca\Token\ContribToken), Object(Drupal\smart_date_recur\SmartDateRecurManager))
#1 /var/www/vendor/drush/drush/src/Boot/DrupalBoot8.php(325): Drupal\smart_date_recur\Drush\Commands\SmartDateRecurCommands::create(Object(Drupal\Core\DependencyInjection\ContainerBuilder))
#2 /var/www/vendor/drush/drush/src/Boot/DrupalBoot8.php(253): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands(Object(Drush\Boot\BootstrapManager))
#3 /var/www/vendor/drush/drush/src/Boot/BootstrapManager.php(291): Drush\Boot\DrupalBoot8->bootstrapDrupalFull(Object(Drush\Boot\BootstrapManager), Object(Consolidation\AnnotatedCommand\AnnotationData))
#4 /var/www/vendor/drush/drush/src/Boot/BootstrapManager.php(432): Drush\Boot\BootstrapManager->doBootstrap(5, 5, Object(Consolidation\AnnotatedCommand\AnnotationData))
#5 /var/www/vendor/drush/drush/src/Boot/BootstrapManager.php(384): Drush\Boot\BootstrapManager->bootstrapToPhaseIndex(5, Object(Consolidation\AnnotatedCommand\AnnotationData))
#6 /var/www/vendor/drush/drush/src/Boot/BootstrapHook.php(32): Drush\Boot\BootstrapManager->bootstrapToPhase('full', Object(Consolidation\AnnotatedCommand\AnnotationData))
#7 /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))
#8 /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))
#9 /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))
#10 /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))
#11 /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))
#12 /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))
#13 /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))
#14 /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))
#15 /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))
#16 /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))
#17 /var/www/vendor/drush/drush/src/Runtime/Runtime.php(51): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/vendor/drush/drush/drush.php(79): Drush\Runtime\Runtime->run(Array)
#19 /var/www/vendor/drush/drush/drush(4): require('/var/www/vendor...')
#20 /var/www/vendor/bin/drush(119): include('/var/www/vendor...')
#21 {main}
TypeError: Drupal\smart_date_recur\Drush\Commands\SmartDateRecurCommands::__construct(): Argument #2 ($entityTypeManager) must be of type Drupal\Core\Entity\EntityTypeManagerInterface, Drupal\smart_date_recur\SmartDateRecurManager given, called in /var/www/web/modules/contrib/smart_date/modules/smart_date_recur/src/Drush/Commands/SmartDateRecurCommands.php on line 39 in Drupal\smart_date_recur\Drush\Commands\SmartDateRecurCommands->__construct() (line 27 of /var/www/web/modules/contrib/smart_date/modules/smart_date_recur/src/Drush/Commands/SmartDateRecurCommands.php).
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes