8000 remove a gc_probability default mention · symfony/symfony-docs@c71b9f9 · GitHub
[go: up one dir, main page]

Skip to content

Commit c71b9f9

Browse files
authored
remove a gc_probability default mention
1 parent 577b39f commit c71b9f9

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

session.rst

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -494,25 +494,18 @@ deleted. This allows one to expire records based on idle time.
494494

495495
However, some operating systems (e.g. Debian) do their own session handling and set
496496
the ``session.gc_probability`` variable to ``0`` to stop PHP doing garbage
497-
collection. That's why Symfony now overwrites this value to ``1``.
498-
499-
If you wish to use the original value set in your ``php.ini``, add the following
500-
configuration:
501-
502-
.. code-block:: yaml
503-
504-
# config/packages/framework.yaml
505-
framework:
506-
session:
507-
# ...
508-
gc_probability: null
497+
collection.
509498

510499
You can configure these settings by passing ``gc_probability``, ``gc_divisor``
511500
and ``gc_maxlifetime`` in an array to the constructor of
512501
:class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage`
513502
or to the :method:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage::setOptions`
514503
method.
515504

505+
.. versionadded:: 7.2
506+
507+
Starting from Symfony 7.2, ``php.ini``'s directive is used as default for ``gc_probability``.
508+
516509
.. _session-database:
517510

518511
Store Sessions in a Database

0 commit comments

Comments
 (0)
0