Skip to content

Commit cbcdb16

Browse files
committed
bug symfony#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
2 parents 6e314dc + 43cc877 commit cbcdb16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ protected function getContainerBuilder()
662662
{
663663
$container = new ContainerBuilder(new ParameterBag($this->getKernelParameters()));
664664

665-
if (class_exists('ProxyManager\Configuration')) {
665+
if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator')) {
666666
$container->setProxyInstantiator(new RuntimeInstantiator());
667667
}
668668

@@ -682,7 +682,7 @@ protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container
682682
// cache the container
683683
$dumper = new PhpDumper($container);
684684

685-
if (class_exists('ProxyManager\Configuration')) {
685+
if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper')) {
686686
$dumper->setProxyDumper(new ProxyDumper(md5((string) $cache)));
687687
}
688688

0 commit comments

Comments
 (0)