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 @@ -892,7 +892,6 @@ // The request stack is preserved across container rebuilds. Reinject the // new session into the master request if one was present before. - $request = NULL; if (($request_stack = $this->container->get('request_stack', ContainerInterface::NULL_ON_INVALID_REFERENCE))) { if ($request = $request_stack->getMasterRequest()) { if ($request->hasSession()) { @@ -906,9 +905,7 @@ } \Drupal::setContainer($this->container); - if ($request) { - $this->container->get('event_dispatcher')->dispatch(self::CONTAINER_INITIALIZE_FINISHED); - } + $this->container->get('event_dispatcher')->dispatch(self::CONTAINER_INITIALIZE_FINISHED); // If needs dumping flag was set, dump the container. if ($this->containerNeedsDumping && !$this->cacheDrupalContainer($container_definition)) { $this->container->get('logger.factory')->get('DrupalKernel')->error('Container cannot be saved to cache.'); diff -u b/core/lib/Drupal/Core/DrupalKernelInterface.php b/core/lib/Drupal/Core/DrupalKernelInterface.php --- b/core/lib/Drupal/Core/DrupalKernelInterface.php +++ b/core/lib/Drupal/Core/DrupalKernelInterface.php @@ -15,9 +15,11 @@ interface DrupalKernelInterface extends HttpKernelInterface, ContainerAwareInterface { /** - * Thde CONTAINER_INITIALIZE_FINISHED event occurs when the service container finished initializing. + * The CONTAINER_INITIALIZE_FINISHED event occurs when the service container + * finished initializing. * - * This event allows you to initialize overrides such as language to the services. + * This event allows you to initialize overrides such as language to the + * services. * * @var string */ diff -u b/core/modules/config_translation/src/Tests/ConfigTranslationCacheTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationCacheTest.php --- b/core/modules/config_translation/src/Tests/ConfigTranslationCacheTest.php +++ b/core/modules/config_translation/src/Tests/ConfigTranslationCacheTest.php @@ -47,7 +47,10 @@ * * @var array */ - protected $langcodes = array('fr', 'ta'); + protected $langcodes = [ + 'fr', + 'ta' + ]; /** * Administrator user for tests.