Skip to content

Commit aeb76ec

Browse files
[HttpKernel] Disable container inlining when legacy inlining has been used
1 parent 2c2044b commit aeb76ec

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function dump(array $options = array())
120120
'namespace' => '',
121121
'as_files' => false,
122122
'debug' => true,
123-
'hot_path_tag' => null,
123+
'hot_path_tag' => 'container.hot_path',
124124
'inline_class_loader_parameter' => 'container.dumper.inline_class_loader',
125125
), $options);
126126

src/Symfony/Component/HttpKernel/Kernel.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -812,13 +812,17 @@ protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container
812812
$dumper->setProxyDumper(new ProxyDumper(substr(hash('sha256', $cache->getPath()), 0, 7)));
813813
}
814814

815+
if ($this->loadClassCache || class_exists(ClassCollectionLoader::class, false)) {
816+
// if legacy inlining has been used, disable container inlining
817+
$this->container->getParameter('container.dumper.inline_class_loader', false);
818+
}
819+
815820
$content = $dumper->dump(array(
816821
'class' => $class,
817822
'base_class' => $baseClass,
818823
'file' => $cache->getPath(),
819824
'as_files' => true,
820825
'debug' => $this->debug,
821-
'hot_path_tag' => !$this->loadClassCache ? 'container.hot_path' : null,
822826
));
823827

824828
$rootCode = array_pop($content);

0 commit comments

Comments
 (0)