Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 0d92943

Browse files
[DI] fix preloading script generation
1 parent e6ead32 commit 0d92943

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

Core/Authentication/AuthenticationProviderManager.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
use Symfony\Component\Security\Core\Exception\AuthenticationException;
2323
use Symfony\Component\Security\Core\Exception\ProviderNotFoundException;
2424

25+
// Help opcache.preload discover always-needed symbols
26+
class_exists(AuthenticationEvents::class);
27+
class_exists(AuthenticationFailureEvent::class);
28+
class_exists(AuthenticationSuccessEvent::class);
29+
2530
/**
2631
* AuthenticationProviderManager uses a list of AuthenticationProviderInterface
2732
* instances to authenticate a Token.

Core/Authorization/ExpressionLanguage.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
use Psr\Cache\CacheItemPoolInterface;
1515
use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage;
1616

17+
// Help opcache.preload discover always-needed symbols
18+
class_exists(ExpressionLanguageProvider::class);
19+
1720
if (!class_exists(BaseExpressionLanguage::class)) {
1821
throw new \LogicException(sprintf('The "%s" class requires the "ExpressionLanguage" component. Try running "composer require symfony/expression-language".', ExpressionLanguage::class));
1922
} else {

Http/Firewall/AnonymousAuthenticationListener.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
2020
use Symfony\Component\Security\Core\Exception\AuthenticationException;
2121

22+
// Help opcache.preload discover always-needed symbols
23+
class_exists(AnonymousToken::class);
24+
2225
/**
2326
* AnonymousAuthenticationListener automatically adds a Token if none is
2427
* already present.

Http/Firewall/LegacyListenerTrait.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
1616
use Symfony\Component\HttpKernel\Event\RequestEvent;
1717

18+
// Help opcache.preload discover always-needed symbols
19+
class_exists(RequestEvent::class);
20+
1821
/**
1922
* @deprecated
2023
*

0 commit comments

Comments
 (0)