diff -u b/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php --- b/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -480,7 +480,15 @@ FileCacheFactory::setConfiguration($configuration); FileCacheFactory::setPrefix(Settings::getApcuPrefix('file_cache', $this->root)); - $this->bootstrapContainer = new $this->bootstrapContainerClass(Settings::get('bootstrap_container_definition', $this->defaultBootstrapContainerDefinition)); + $bootstrap_container_definition = Settings::get('bootstrap_container_definition', $this->defaultBootstrapContainerDefinition); + // BC layer for ensuring that the PHP serialization service is present in + // case the bootstrap container definition is overridden and does not yet + // contain it. + if (!isset($bootstrap_container_definition['serialization.phpserialize'])) { + @trigger_error('The "serialization.phpserialize" service is required for the bootstrap container. See: https://www.drupal.org/node/3014688', E_USER_DEPRECATED); + $bootstrap_container_definition['serialization.phpserialize'] = ['class' => 'Drupal\Component\Serialization\PhpSerialize']; + } + $this->bootstrapContainer = new $this->bootstrapContainerClass($bootstrap_container_definition); // Initialize the container. $this->initializeContainer(); only in patch2: unchanged: --- a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php +++ b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php @@ -147,6 +147,7 @@ public static function getSkippedDeprecations() { 'The "core/classList" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use the the native browser implementation instead. See https://www.drupal.org/node/3089511', 'The "core/jquery.ui.datepicker" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3081864', 'The "locale/drupal.locale.datepicker" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3081864', + 'The "serialization.phpserialize" service is required for the bootstrap container. See: https://www.drupal.org/node/3014688', ]; }