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

Commit

Permalink
[DI] fix preloading script generation
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Mar 17, 2020
1 parent e6ead32 commit 0d92943
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Core/Authentication/AuthenticationProviderManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\Exception\ProviderNotFoundException;

// Help opcache.preload discover always-needed symbols
class_exists(AuthenticationEvents::class);
class_exists(AuthenticationFailureEvent::class);
class_exists(AuthenticationSuccessEvent::class);

/**
* AuthenticationProviderManager uses a list of AuthenticationProviderInterface
* instances to authenticate a Token.
Expand Down
3 changes: 3 additions & 0 deletions Core/Authorization/ExpressionLanguage.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
use Psr\Cache\CacheItemPoolInterface;
use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage;

// Help opcache.preload discover always-needed symbols
class_exists(ExpressionLanguageProvider::class);

if (!class_exists(BaseExpressionLanguage::class)) {
throw new \LogicException(sprintf('The "%s" class requires the "ExpressionLanguage" component. Try running "composer require symfony/expression-language".', ExpressionLanguage::class));
} else {
Expand Down
3 changes: 3 additions & 0 deletions Http/Firewall/AnonymousAuthenticationListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;

// Help opcache.preload discover always-needed symbols
class_exists(AnonymousToken::class);

/**
* AnonymousAuthenticationListener automatically adds a Token if none is
* already present.
Expand Down
3 changes: 3 additions & 0 deletions Http/Firewall/LegacyListenerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\RequestEvent;

// Help opcache.preload discover always-needed symbols
class_exists(RequestEvent::class);

/**
* @deprecated
*
Expand Down

0 comments on commit 0d92943

Please sign in to comment.