Skip to content

Commit aa6b8c7

Browse files
committed
minor #19179 [Security] Migrate to ConfigBuilder format (alexandre-daubois)
This PR was merged into the 5.4 branch. Discussion ---------- [Security] Migrate to ConfigBuilder format Fix #19178 Commits ------- f9a7e19 [Security] Migrate to ConfigBuilder format
2 parents 2164b05 + f9a7e19 commit aa6b8c7

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

reference/configuration/security.rst

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -119,25 +119,21 @@ user logs out::
119119
.. code-block:: php
120120
121121
// config/packages/security.php
122-
$container->loadFromExtension('security', [
122+
123+
// ...
124+
125+
return static function (SecurityConfig $securityConfig): void {
123126
// ...
124-
'firewalls' => [
125-
'main' => [
126-
'logout' => [
127-
'delete_cookies' => [
128-
'cookie1-name' => null,
129-
'cookie2-name' => [
130-
'path' => '/',
131-
],
132-
'cookie3-name' => [
133-
'path' => null,
134-
'domain' => 'example.com',
135-
],
136-
],
137-
],
138-
],
139-
],
140-
]);
127+
128+
$securityConfig->firewall('main')
129+
->logout()
130+
->deleteCookie('cookie1-name')
131+
->deleteCookie('cookie2-name')
132+
->path('/')
133+
->deleteCookie('cookie3-name')
134+
->path(null)
135+
->domain('example.com');
136+
};
141137
142138
erase_credentials
143139
~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)