Skip to content

Commit 30cd781

Browse files
[DI] fix preloading script generation
1 parent bbbc12b commit 30cd781

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

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.

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 {

0 commit comments

Comments
 (0)