[HttpKernel] Fix loading legacy 3.3 containers in 3.4 context

This commit is contained in:
Nicolas Grekas 2017-08-30 16:21:48 +02:00
parent 483c7bad3b
commit 8264a9e398

View File

@ -598,9 +598,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
}
}
if ($oldContainer = file_exists($cache->getPath()) ? @include $cache->getPath() : false) {
$oldContainer = new \ReflectionClass($oldContainer);
}
$oldContainer = file_exists($cache->getPath()) && is_object($oldContainer = @include $cache->getPath()) ? new \ReflectionClass($oldContainer) : false;
$this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass());