Problem/Motivation
I am using Scheduler version 1.4.0 and Scheduler Content Moderation Integration 1.4. I want to update both to ^2.0. I was unable to upgrade either module due to composer conflicts with each other's versions. There is a deadlock where Scheduler wants a higher version of SCMI, and SCMI wants a higher version of Scheduler. The solution I came up with was this: composer require 'drupal/scheduler_content_moderation_integration:^2.0@beta' 'drupal/scheduler:^2.0'
. This allowed the modules to be upgraded.
However, it crashed our site. Oddly, on a test site, there was no issue. On production, the site crashed with this error:
The website encountered an unexpected error. Please try again later.
ArgumentCountError: Too few arguments to function Drupal\scheduler\SchedulerManager::__construct(), 7 passed in /home/limestonedouglas/public_html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 and exactly 9 expected in Drupal\scheduler\SchedulerManager->__construct() (line 96 of modules/contrib/scheduler/src/SchedulerManager.php).
Drupal\scheduler\SchedulerManager->__construct() (Line: 259)
Drupal\Component\DependencyInjection\Container->createService() (Line: 177)
Drupal\Component\DependencyInjection\Container->get() (Line: 207)
Drupal::service() (Line: 18)
Drupal\scheduler\Theme\SchedulerThemeNegotiator->applies() (Line: 67)
Drupal\Core\Theme\ThemeNegotiator->determineActiveTheme() (Line: 405)
Drupal\Core\Theme\ThemeManager->initTheme() (Line: 96)
Drupal\Core\Theme\ThemeManager->getActiveTheme() (Line: 233)
Drupal\Core\Theme\Registry->init() (Line: 277)
Drupal\Core\Theme\Registry->getRuntime() (Line: 194)
Drupal\Core\Entity\EntityViewBuilder->getBuildDefaults() (Line: 61)
Drupal\node\NodeViewBuilder->getBuildDefaults() (Line: 157)
Drupal\Core\Entity\EntityViewBuilder->viewMultiple() (Line: 123)
Drupal\Core\Entity\EntityViewBuilder->view() (Line: 134)
Drupal\Core\Entity\Controller\EntityViewController->view() (Line: 66)
Drupal\node\Controller\NodeViewController->view()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 718)
Drupal\Core\DrupalKernel->handle() (Line: 19)
I'm not sure what to do now. I hope this error provides clues.
Steps to reproduce
Using Drupal 9.5.10, with the module versions shown above. Try to update either module using composer. I was unable to do this. By adding them both to the same composer require command, I was able to upgrade. This crashed my site completely. No page was accessible at this point, so I downgraded back to previous versions.