Skip to content

Commit ffc2c44

Browse files
committed
minor #18819 [HttpFoundation] Allow setting session options via DSN (alexandre-daubois)
This PR was merged into the 5.4 branch. Discussion ---------- [HttpFoundation] Allow setting session options via DSN Fix #15964 It wasn't easy to know where to add this. Hope it should belong to this section! Commits ------- 824e28d [HttpFoundation] Allow setting session options via DSN
2 parents f07d861 + 824e28d commit ffc2c44

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

session.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,17 @@ and only the first one stored the CSRF token in the session.
667667
replace ``RedisSessionHandler`` by
668668
:class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcachedSessionHandler`.
669669

670+
.. tip::
671+
672+
When using Redis with a DSN in the
673+
:ref:`handler_id <config-framework-session-handler-id>` config option, the
674+
latter can contain the ``prefix`` and ``ttl`` options as query string parameters.
675+
676+
.. versionadded:: 5.4
677+
678+
The support for ``prefix`` and ``ttl`` options in a Redis DSN was
679+
introduced in Symfony 5.4.
680+
670681
.. _session-database-pdo:
671682

672683
Store Sessions in a Relational Database (MariaDB, MySQL, PostgreSQL)

0 commit comments

Comments
 (0)