Skip to content

Commit eba50ed

Browse files
committed
bug #25082 [HttpKernel] Disable container inlining when legacy inlining has been used (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [HttpKernel] Disable container inlining when legacy inlining has been used | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #25059 | License | MIT | Doc PR | - Commits ------- 4a11683 [HttpKernel] Disable container inlining when legacy inlining has been used
2 parents 921a4a0 + 4a11683 commit eba50ed

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ 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

127127
$this->namespace = $options['namespace'];
128128
$this->asFiles = $options['as_files'];
129129
$this->hotPathTag = $options['hot_path_tag'];
130-
$this->inlineRequires = $this->container->hasParameter($options['inline_class_loader_parameter']) && $this->container->getParameter($options['inline_class_loader_parameter']);
130+
$this->inlineRequires = $options['inline_class_loader_parameter'] && $this->container->hasParameter($options['inline_class_loader_parameter']) && $this->container->getParameter($options['inline_class_loader_parameter']);
131131

132132
if (0 !== strpos($baseClass = $options['base_class'], '\\') && 'Container' !== $baseClass) {
133133
$baseClass = sprintf('%s\%s', $options['namespace'] ? '\\'.$options['namespace'] : '', $baseClass);

src/Symfony/Component/HttpKernel/Kernel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container
818818
'file' => $cache->getPath(),
819819
'as_files' => true,
820820
'debug' => $this->debug,
821-
'hot_path_tag' => !$this->loadClassCache ? 'container.hot_path' : null,
821+
'inline_class_loader_parameter' => !$this->loadClassCache && !class_exists(ClassCollectionLoader::class, false) ? 'container.dumper.inline_class_loader' : null,
822822
));
823823

824824
$rootCode = array_pop($content);

0 commit comments

Comments
 (0)