Skip to content

Commit bc9917a

Browse files
committed
Merge branch '5.0'
* 5.0: Removed the versionadded directive Mentioned the PHP 7.4 class preloading Scalingo is another PaaS which supports Symfony
2 parents 53417d4 + 3777c92 commit bc9917a

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

deployment.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ app quickly. There are many PaaS - below are a few that work well with Symfony:
7272
* `Azure`_
7373
* `fortrabbit`_
7474
* `Clever Cloud`_
75+
* `Scalingo`_
7576

7677
Using Build Scripts and other Tools
7778
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -254,3 +255,4 @@ Learn More
254255
.. _`EasyDeployBundle`: https://github.com/EasyCorp/easy-deploy-bundle
255256
.. _`Clever Cloud`: https://www.clever-cloud.com/doc/php/tutorial-symfony/
256257
.. _`Symfony Cloud`: https://symfony.com/doc/master/cloud/intro.html
258+
.. _`Scalingo`: https://doc.scalingo.com/languages/php/symfony

performance.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Production Server Checklist
1717
---------------------------
1818

1919
#. :ref:`Use the OPcache byte code cache <performance-use-opcache>`
20+
#. :ref:`Use the OPcache class preloading <performance-use-preloading>`
2021
#. :ref:`Configure OPcache for maximum performance <performance-configure-opcache>`
2122
#. :ref:`Don't check PHP files timestamps <performance-dont-check-timestamps>`
2223
#. :ref:`Configure the PHP realpath Cache <performance-configure-realpath-cache>`
@@ -42,6 +43,24 @@ every request. There are some `byte code caches`_ available, but as of PHP
4243
5.5, PHP comes with `OPcache`_ built-in. For older versions, the most widely
4344
used byte code cache is `APC`_.
4445

46+
.. _performance-use-preloading:
47+
48+
Use the OPcache class preloading
49+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50+
51+
Starting from PHP 7.4, OPcache can compile and load classes at start-up and
52+
make them available to all requests until the server is restarted, improving
53+
performance significantly.
54+
55+
Symfony generates the file automatically with the list of classes to preload.
56+
The file path is the same as the file generated for the service container but
57+
with the ``preload`` suffix:
58+
59+
.. code-block:: ini
60+
61+
; php.ini
62+
opcache.preload=/path/to/project/var/cache/prod/App_KernelProdContainer.preload.php
63+
4564
.. _performance-configure-opcache:
4665

4766
Configure OPcache for Maximum Performance

0 commit comments

Comments
 (0)