Problem/Motivation
I've recently updated views_bulk_operations from version 4.1.4 to 4.2.5. At the end of drush updb
I see this error at the end of the command output:
...
> [warning] No configuration objects have been updated.
[success] Finished performing updates.
[error] Error: Class "Drupal\views_bulk_operations\ViewsBulkOperationsEvent" not found in Drupal\views_bulk_operations\EventSubscriber\ViewsBulkOperationsEventSubscriber::getSubscribedEvents() (line 39 of /app/web/modules/contrib/views_bulk_operations/src/EventSubscriber/ViewsBulkOperationsEventSubscriber.php) #0 /app/web/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterEventSubscribersPass.php(37): Drupal\views_bulk_operations\EventSubscriber\ViewsBulkOperationsEventSubscriber::getSubscribedEvents()
#1 /app/vendor/symfony/dependency-injection/Compiler/Compiler.php(73): Drupal\Core\DependencyInjection\Compiler\RegisterEventSubscribersPass->process(Object(Drupal\Core\DependencyInjection\ContainerBuilder))
#2 /app/vendor/symfony/dependency-injection/ContainerBuilder.php(721): Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object(Drupal\Core\DependencyInjection\ContainerBuilder))
#3 /app/web/core/lib/Drupal/Core/DrupalKernel.php(1318): Symfony\Component\DependencyInjection\ContainerBuilder->compile()
#4 /app/web/core/lib/Drupal/Core/DrupalKernel.php(922): Drupal\Core\DrupalKernel->compileContainer()
#5 /app/web/core/lib/Drupal/Core/Update/UpdateKernel.php(42): Drupal\Core\DrupalKernel->initializeContainer()
#6 /app/vendor/drush/drush/src/Drupal/DrupalKernelTrait.php(72): Drupal\Core\Update\UpdateKernel->initializeContainer()
#7 /app/web/core/lib/Drupal/Core/DrupalKernel.php(1173): Drush\Drupal\UpdateKernel->initializeContainer()
#8 /app/web/core/includes/common.inc(503): Drupal\Core\DrupalKernel->rebuildContainer()
#9 /app/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(87): drupal_flush_all_caches()
#10 [internal function]: Drush\Commands\core\UpdateDBCommands->updatedb(Array)
#11 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
#12 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#13 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#14 /app/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#15 /app/vendor/symfony/console/Command/Command.php(312): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /app/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /app/vendor/symfony/console/Application.php(314): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /app/vendor/symfony/console/Application.php(168): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /app/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /app/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /app/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run(Array)
#22 /app/vendor/drush/drush/drush(4): require('/app/vendor/dru...')
#23 /app/vendor/bin/drush(120): include('/app/vendor/dru...')
#24 {main}.
Locally it doesn't really do any harm, because everything works fine afterwards (and I can manually run the needed commands afterwards), but it breaks our automatic deploy process and our CI.
I'm not sure where this error comes from. Upon investigating the code class Drupal\views_bulk_operations\ViewsBulkOperationsEvent
is used in the Drupal\views_bulk_operations\EventSubscriber\ViewsBulkOperationsEventSubscriber
so I'm not sure how to resolve this issue.