Skip to content

Commit 56f90e5

Browse files
committed
Merge branch '7.0' into 7.1
* 7.0: Update console.rst [Security] Migrate to ConfigBuilder format for 6.3+
2 parents 5a531b8 + 443b844 commit 56f90e5

File tree

2 files changed

+25
-32
lines changed

2 files changed

+25
-32
lines changed

console.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,8 @@ console::
489489
{
490490
public function testExecute(): void
491491
{
492-
$kernel = self::bootKernel();
493-
$application = new Application($kernel);
492+
self::bootKernel();
493+
$application = new Application(self::$kernel);
494494

495495
$command = $application->find('app:create-user');
496496
$commandTester = new CommandTester($command);

reference/configuration/security.rst

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -479,25 +479,21 @@ user logs out::
479479
.. code-block:: php
480480
481481
// config/packages/security.php
482-
$container->loadFromExtension('security', [
482+
483+
// ...
484+
485+
return static function (SecurityConfig $securityConfig): void {
483486
// ...
484-
'firewalls' => [
485-
'main' => [
486-
'logout' => [
487-
'delete_cookies' => [
488-
'cookie1-name' => null,
489-
'cookie2-name' => [
490-
'path' => '/',
491-
],
492-
'cookie3-name' => [
493-
'path' => null,
494-
'domain' => 'example.com',
495-
],
496-
],
497-
],
498-
],
499-
],
500-
]);
487+
488+
$securityConfig->firewall('main')
489+
->logout()
490+
->deleteCookie('cookie1-name')
491+
->deleteCookie('cookie2-name')
492+
->path('/')
493+
->deleteCookie('cookie3-name')
494+
->path(null)
495+
->domain('example.com');
496+
};
501497
502498
503499
clear_site_data
@@ -554,19 +550,16 @@ It's also possible to use ``*`` as a wildcard for all directives:
554550
.. code-block:: php
555551
556552
// config/packages/security.php
557-
$container->loadFromExtension('security', [
553+
554+
// ...
555+
556+
return static function (SecurityConfig $securityConfig): void {
558557
// ...
559-
'firewalls' => [
560-
'main' => [
561-
'logout' => [
562-
'clear-site-data' => [
563-
'cookies',
564-
'storage',
565-
],
566-
],
567-
],
568-
],
569-
]);
558+
559+
$securityConfig->firewall('main')
560+
->logout()
561+
->clearSiteData(['cookies', 'storage']);
562+
};
570563
571564
invalidate_session
572565
..................

0 commit comments

Comments
 (0)