bug #14266 [HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed (hason)
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
43cc877
[HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed
This commit is contained in:
commit
cbcdb16bee
|
@ -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