[HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed
This commit is contained in:
parent
b77d8c5bc5
commit
43cc8776df
@ -662,7 +662,7 @@ abstract class Kernel implements KernelInterface, TerminableInterface
|
||||
{
|
||||
$container = new ContainerBuilder(new ParameterBag($this->getKernelParameters()));
|
||||
|
||||
if (class_exists('ProxyManager\Configuration')) {
|
||||
if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator')) {
|
||||
$container->setProxyInstantiator(new RuntimeInstantiator());
|
||||
}
|
||||
|
||||
@ -682,7 +682,7 @@ abstract class Kernel implements KernelInterface, TerminableInterface
|
||||
// cache the container
|
||||
$dumper = new PhpDumper($container);
|
||||
|
||||
if (class_exists('ProxyManager\Configuration')) {
|
||||
if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper')) {
|
||||
$dumper->setProxyDumper(new ProxyDumper(md5((string) $cache)));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user