Skip to content

Commit 998b214

Browse files
[framework-bundle] enable "inline_factories", disable "inline_class_loader" when PHP 7.4 preloading is used
1 parent f6390f7 commit 998b214

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

symfony/framework-bundle/4.2/src/Kernel.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ public function getProjectDir(): string
3333
protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
3434
{
3535
$container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php'));
36-
$container->setParameter('container.dumper.inline_class_loader', true);
36+
$container->setParameter('container.dumper.inline_class_loader', \PHP_VERSION_ID < 70400 || !ini_get('opcache.preload'));
37+
$container->setParameter('container.dumper.inline_factories', true);
3738
$confDir = $this->getProjectDir().'/config';
3839

3940
$loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob');

0 commit comments

Comments
 (0)