8000 [HttpKernel] use ConfigCache::getPath() method when it exists · symfony/symfony@215c42b · GitHub
[go: up one dir, main page]

Skip to content

Commit 215c42b

Browse files
committed
[HttpKernel] use ConfigCache::getPath() method when it exists
This way, the deprecated `__toString()` method of the `ConfigCache` class will not be called.
1 parent daf4a03 commit 215c42b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,11 @@ protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container
695695
$dumper = new PhpDumper($container);
696696

697697
if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper')) {
698-
$dumper->setProxyDumper(new ProxyDumper(md5((string) $cache)));
698+
if (method_exists($cache, 'getPath')) {
699+
$dumper->setProxyDumper(new ProxyDumper(md5($cache->getPath())));
700+
} else {
701+
$dumper->setProxyDumper(new ProxyDumper(md5((string) $cache)));
702+
}
699703
}
700704

701705
$content = $dumper->dump(array('class' => $class, 'base_class' => $baseClass, 'file' => $cache->getPath()));

0 commit comments

Comments
 (0)
0