Skip to content

Commit cfa1442

Browse files
committed
minor #13986 Fix OPcache class preload requirement (ITernovtsiy)
This PR was merged into the 4.4 branch. Discussion ---------- Fix OPcache class preload requirement `container.dumper.inline_factories` As stated by @nicolas-grekas in symfony/symfony#32581 (comment) > With preloading, a single big file can, in theory, be similarly fast or faster. `container.dumper.inline_class_loader` With this parameter set to `true`, we'll do extra `include_once` for classes already preloaded by OPcache. Additionally, it can lead to warnings (cannot redeclare class) in classes that use `class_alias`, like https://github.com/FriendsOfSymfony/FOSHttpCacheBundle/blob/master/src/EventListener/InvalidationListener.php#L33 It's because this class already declared in preload, and PHP tries to declare it again after `include_once` in service getter. Commits ------- cc151fc Remove incorrect opcache preload instructions
2 parents a4d0c61 + cc151fc commit cfa1442

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

performance.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ During container compilation (e.g. when running the ``cache:clear`` command),
109109
Symfony generates a file called ``preload.php`` in the ``config/`` directory
110110
with the list of classes to preload.
111111

112-
The only requirement is that you need to set both ``container.dumper.inline_factories``
113-
and ``container.dumper.inline_class_loader`` parameters to ``true``. Then, you
114-
can configure PHP to use this preload file:
112+
You can configure PHP to use this preload file:
115113

116114
.. code-block:: ini
117115

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy