Skip to content

Commit ea9d281

Browse files
Merge branch '4.4' into 5.0
* 4.4: [DI] Fix CheckTypeDeclarationPass [Security/Http] don't require the session to be started when tracking its id [DI] fix preloading script generation
2 parents 195fa7f + b3524e3 commit ea9d281

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

HttpClientKernel.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
use Symfony\Component\Mime\Part\TextPart;
2222
use Symfony\Contracts\HttpClient\HttpClientInterface;
2323

24+
// Help opcache.preload discover always-needed symbols
25+
class_exists(ResponseHeaderBag::class);
26+
2427
/**
2528
* An implementation of a Symfony HTTP kernel using a "real" HTTP client.
2629
*

HttpKernel.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@
3232
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
3333
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
3434

35+
// Help opcache.preload discover always-needed symbols
36+
class_exists(LegacyEventDispatcherProxy::class);
37+
class_exists(ControllerArgumentsEvent::class);
38+
class_exists(ControllerEvent::class);
39+
class_exists(ExceptionEvent::class);
40+
class_exists(FinishRequestEvent::class);
41+
class_exists(RequestEvent::class);
42+
class_exists(ResponseEvent::class);
43+
class_exists(TerminateEvent::class);
44+
class_exists(ViewEvent::class);
45+
class_exists(KernelEvents::class);
46+
3547
/**
3648
* HttpKernel notifies events to convert a Request object to a Response one.
3749
*

Kernel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
use Symfony\Component\HttpKernel\DependencyInjection\AddAnnotatedClassesToCachePass;
3939
use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass;
4040

41+
// Help opcache.preload discover always-needed symbols
42+
class_exists(ConfigCache::class);
43+
4144
/**
4245
* The Kernel is the heart of the Symfony system.
4346
*
@@ -716,6 +719,7 @@ protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container
716719
'as_files' => true,
717720
'debug' => $this->debug,
718721
'build_time' => $container->hasParameter('kernel.container_build_time') ? $container->getParameter('kernel.container_build_time') : time(),
722+
'preload_classes' => array_map('get_class', $this->bundles),
719723
]);
720724

721725
$rootCode = array_pop($content);

0 commit comments

Comments
 (0)