Revert "Issue #2730129 by klausi, jibran, dawehner: DrupalKernel must never persist service_container for Symfony 3 update"
This reverts commit bfdc7b529a
.
8.2.x
parent
bfdc7b529a
commit
9f01ba7487
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue