Skip to content

Commit 98c52bd

Browse files
committed
Merge branch '5.2' into 5.3
* 5.2: Adding opcache.preload_user Fixing code sample Minor rewording Adding FQCN Minor rewording
2 parents fd889f7 + ae7081d commit 98c52bd

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

components/http_foundation/session_configuration.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,16 @@ Configuring Garbage Collection
154154
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
155155

156156
When a session opens, PHP will call the ``gc`` handler randomly according to the
157-
probability set by ``session.gc_probability`` / ``session.gc_divisor``. For
158-
example if these were set to ``5/100`` respectively, it would mean a probability
159-
of 5%. Similarly, ``3/4`` would mean a 3 in 4 chance of being called, i.e. 75%.
157+
probability set by ``session.gc_probability`` / ``session.gc_divisor`` in ``php.ini``.
158+
For example if these were set to ``5/100``, it would mean a probability of 5%.
160159

161-
If the garbage collection handler is invoked, PHP will pass the value stored in
162-
the ``php.ini`` directive ``session.gc_maxlifetime``. The meaning in this context is
163-
that any stored session that was saved more than ``gc_maxlifetime`` ago should be
164-
deleted. This allows one to expire records based on idle time.
160+
If the garbage collection handler is invoked, PHP will pass the value of
161+
``session.gc_maxlifetime``, meaning that any stored session that was saved more
162+
than ``gc_maxlifetime`` seconds ago should be deleted. This allows to expire records
163+
based on idle time.
165164

166165
However, some operating systems (e.g. Debian) do their own session handling and set
167-
the ``session.gc_probability`` variable to ``0`` to stop PHP doing garbage
166+
the ``session.gc_probability`` directive to ``0`` to stop PHP doing garbage
168167
collection. That's why Symfony now overwrites this value to ``1``.
169168

170169
If you wish to use the original value set in your ``php.ini``, add the following

performance.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ container into a single file, which could improve performance when using
8484
// config/services.php
8585
8686
// ...
87-
$container->setParameter('container.dumper.inline_factories', true);
87+
$container->parameters()->set('container.dumper.inline_factories', true);
8888
8989
.. _performance-use-opcache:
9090

@@ -115,6 +115,9 @@ Symfony generates a file with the list of classes to preload in the
115115
116116
; php.ini
117117
opcache.preload=/path/to/project/config/preload.php
118+
119+
; required for opcache.preload:
120+
opcache.preload_user=www-data
118121
119122
If this file is missing, run this command to reinstall the Symfony Flex recipe:
120123
``composer recipes:install symfony/framework-bundle --force -v``.

reference/configuration/framework.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,7 @@ The possible values for this option are:
16451645

16461646
* ``null``, use it to disable this protection. Same behavior as in older Symfony
16471647
versions.
1648-
* ``'none'`` (or the ``Cookie::SAMESITE_NONE`` constant), use it to allow
1648+
* ``'none'`` (or the ``Symfony\Component\HttpFoundation\Cookie::SAMESITE_NONE`` constant), use it to allow
16491649
sending of cookies when the HTTP request originated from a different domain
16501650
(previously this was the default behavior of null, but in newer browsers ``'lax'``
16511651
would be applied when the header has not been set)

session/database.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Store Sessions in a Database
55
============================
66

77
Symfony stores sessions in files by default. If your application is served by
8-
multiple servers, you'll need to use instead a database to make sessions work
8+
multiple servers, you'll need to use a database instead to make sessions work
99
across different servers.
1010

1111
Symfony can store sessions in all kinds of databases (relational, NoSQL and

0 commit comments

Comments
 (0)