From 9f01ba7487c01d63dbe851e56d36ece0ad9350ed Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole Date: Thu, 26 May 2016 12:13:21 +0100 Subject: [PATCH] Revert "Issue #2730129 by klausi, jibran, dawehner: DrupalKernel must never persist service_container for Symfony 3 update" This reverts commit bfdc7b529a9c51ce10c66a07a6405a823731d390. --- core/lib/Drupal/Core/DrupalKernel.php | 3 +-- .../system/src/Tests/DrupalKernel/DrupalKernelTest.php | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index 1c8068b7944..90541f43dab 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -1227,8 +1227,7 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface { // be automatically reinstantiated. Also include services tagged to persist. $persist_ids = array(); foreach ($container->getDefinitions() as $id => $definition) { - // It does not make sense to persist the container itself, exclude it. - if ($id !== 'service_container' && ($definition->isSynthetic() || $definition->getTag('persist'))) { + if ($definition->isSynthetic() || $definition->getTag('persist')) { $persist_ids[] = $id; } } diff --git a/core/modules/system/src/Tests/DrupalKernel/DrupalKernelTest.php b/core/modules/system/src/Tests/DrupalKernel/DrupalKernelTest.php index 5e4cc402d41..c412d991a53 100644 --- a/core/modules/system/src/Tests/DrupalKernel/DrupalKernelTest.php +++ b/core/modules/system/src/Tests/DrupalKernel/DrupalKernelTest.php @@ -146,11 +146,6 @@ class DrupalKernelTest extends KernelTestBase { 'pathname' => drupal_get_filename('module', 'service_provider_test'), 'filename' => NULL, )); - - // Check that the container itself is not among the persist IDs because it - // does not make sense to persist the container itself. - $persist_ids = $container->getParameter('persist_ids'); - $this->assertFalse(array_search('service_container', $persist_ids)); } /**