Revert "Issue #2730129 by klausi, jibran, dawehner: DrupalKernel must never persist service_container for Symfony 3 update"

This reverts commit bfdc7b529a.
8.2.x
Nathaniel Catchpole 2016-05-26 12:13:21 +01:00
parent bfdc7b529a
commit 9f01ba7487
2 changed files with 1 additions and 7 deletions

View File

@ -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;
}
}

View File

@ -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));
}
/**