[DI] Fix tracking of source class changes for lazy-proxies
This commit is contained in:
parent
0023f4e84d
commit
4f18e4b0dc
@ -398,6 +398,8 @@ EOTXT;
|
|||||||
if (!$proxyDumper->isProxyCandidate($definition)) {
|
if (!$proxyDumper->isProxyCandidate($definition)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// register class' reflector for resource tracking
|
||||||
|
$this->container->getReflectionClass($definition->getClass());
|
||||||
$proxyCode = "\n".$proxyDumper->getProxyCode($definition);
|
$proxyCode = "\n".$proxyDumper->getProxyCode($definition);
|
||||||
if ($strip) {
|
if ($strip) {
|
||||||
$proxyCode = "<?php\n".$proxyCode;
|
$proxyCode = "<?php\n".$proxyCode;
|
||||||
@ -1043,10 +1045,10 @@ EOF;
|
|||||||
}
|
}
|
||||||
$code .= <<<EOF
|
$code .= <<<EOF
|
||||||
|
|
||||||
protected function createProxy(\$class, \Closure \$factory)
|
protected function createProxy(\$class, \Closure \$factory)
|
||||||
{
|
{
|
||||||
{$proxyLoader}return \$factory();
|
{$proxyLoader}return \$factory();
|
||||||
}
|
}
|
||||||
|
|
||||||
EOF;
|
EOF;
|
||||||
break;
|
break;
|
||||||
|
@ -842,7 +842,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
|
|||||||
$dumper = new PhpDumper($container);
|
$dumper = new PhpDumper($container);
|
||||||
|
|
||||||
if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper')) {
|
if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper')) {
|
||||||
$dumper->setProxyDumper(new ProxyDumper(substr(hash('sha256', $cache->getPath()), 0, 7)));
|
$dumper->setProxyDumper(new ProxyDumper());
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = $dumper->dump(array(
|
$content = $dumper->dump(array(
|
||||||
|
Reference in New Issue
Block a user