Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ private function generateProxyClasses()
if (!$proxyDumper->isProxyCandidate($definition)) {
continue;
}
// register class' reflector for resource tracking
$this->container->getReflectionClass($definition->getClass());
$proxyCode = "\n".$proxyDumper->getProxyCode($definition);
if ($strip) {
$proxyCode = "<?php\n".$proxyCode;
Expand Down Expand Up @@ -1043,10 +1045,10 @@ protected function load(\$file, \$lazyLoad = true)
}
$code .= <<<EOF

protected function createProxy(\$class, \Closure \$factory)
{
{$proxyLoader}return \$factory();
}
protected function createProxy(\$class, \Closure \$factory)
{
{$proxyLoader}return \$factory();
}

EOF;
break;
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpKernel/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container
$dumper = new PhpDumper($container);

if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper')) {
$dumper->setProxyDumper(new ProxyDumper(substr(hash('sha256', $cache->getPath()), 0, 7)));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't serve any purpose now, and made container's cache path-dependend

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we deprecate the salt argument in 4.1 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's possible, although it doesn't really hurt, so low priority on my side (if anyone wants to do it, PR welcome :))

$dumper->setProxyDumper(new ProxyDumper());
}

$content = $dumper->dump(array(
Expand Down