File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -494,25 +494,18 @@ deleted. This allows one to expire records based on idle time.
494494
495495However, some operating systems (e.g. Debian) do their own session handling and set
496496the ``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
510499You can configure these settings by passing ``gc_probability ``, ``gc_divisor ``
511500and ``gc_maxlifetime `` in an array to the constructor of
512501:class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ NativeSessionStorage `
513502or to the :method: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ NativeSessionStorage::setOptions `
514503method.
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
518511Store Sessions in a Database
You can’t perform that action at this time.
0 commit comments