Skip to content

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 ff006c7 commit 109ac25
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions AcceptHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

namespace Symfony\Component\HttpFoundation;

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

/**
* Represents an Accept-* header.
*
Expand Down
8 changes: 8 additions & 0 deletions Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
use Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException;
use Symfony\Component\HttpFoundation\Session\SessionInterface;

// Help opcache.preload discover always-needed symbols
class_exists(AcceptHeader::class);
class_exists(FileBag::class);
class_exists(HeaderBag::class);
class_exists(HeaderUtils::class);
class_exists(ParameterBag::class);
class_exists(ServerBag::class);

/**
* Request represents an HTTP request.
*
Expand Down
3 changes: 3 additions & 0 deletions Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

namespace Symfony\Component\HttpFoundation;

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

/**
* Response represents an HTTP response.
*
Expand Down
5 changes: 5 additions & 0 deletions Session/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface;

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

/**
* @author Fabien Potencier <fabien@symfony.com>
* @author Drak <drak@zikula.org>
Expand Down
5 changes: 5 additions & 0 deletions Session/Storage/NativeSessionStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy;
use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy;

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

/**
* This provides a base class for session attribute storage.
*
Expand Down

0 comments on commit 109ac25

Please sign in to comment.