Skip to content

Commit 77f2b79

Browse files
committed
minor #16971 Switch to const Cookie::SAMESITE_LAX (ThomasLandauer)
This PR was merged into the 5.4 branch. Discussion ---------- Switch to const `Cookie::SAMESITE_LAX` ...to make the available options more obvious. Commits ------- f887a21 Switch to const `Cookie::SAMESITE_LAX`
2 parents 1b84e50 + f887a21 commit 77f2b79

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

session.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ sessions, check their default configuration:
5757
.. code-block:: php
5858
5959
// config/packages/framework.php
60+
use Symfony\Component\HttpFoundation\Cookie;
6061
use Symfony\Config\FrameworkConfig;
6162
6263
return static function (FrameworkConfig $framework) {
@@ -69,7 +70,7 @@ sessions, check their default configuration:
6970
->handlerId(null)
7071
// improves the security of the cookies used for sessions
7172
->cookieSecure('auto')
72-
->cookieSamesite('lax')
73+
->cookieSamesite(Cookie::SAMESITE_LAX)
7374
->storage_factory_id('session.storage.factory.native')
7475
;
7576
};

0 commit comments

Comments
 (0)