File tree 1 file changed +5
-12
lines changed
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.
494
494
495
495
However, some operating systems (e.g. Debian) do their own session handling and set
496
496
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.
509
498
510
499
You can configure these settings by passing ``gc_probability ``, ``gc_divisor ``
511
500
and ``gc_maxlifetime `` in an array to the constructor of
512
501
:class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ NativeSessionStorage `
513
502
or to the :method: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ NativeSessionStorage::setOptions `
514
503
method.
515
504
505
+ .. versionadded :: 7.2
506
+
507
+ Starting from Symfony 7.2, ``php.ini ``'s directive is used as default for ``gc_probability ``.
508
+
516
509
.. _session-database :
517
510
518
511
Store Sessions in a Database
You can’t perform that action at this time.
0 commit comments