@@ -417,11 +417,10 @@ private function createFirewall(ContainerBuilder $container, string $id, array $
417
417
$ listeners [] = new Reference ('security.channel_listener ' );
418
418
419
419
$ contextKey = null ;
420
- $ contextListenerId = null ;
421
420
// Context serializer listener
422
421
if (false === $ firewall ['stateless ' ]) {
423
422
$ contextKey = $ firewall ['context ' ] ?? $ id ;
424
- $ listeners [] = new Reference ($ contextListenerId = $ this ->createContextListener ($ container , $ contextKey , $ firewallEventDispatcherId ));
423
+ $ listeners [] = new Reference ($ this ->createContextListener ($ container , $ contextKey , $ firewallEventDispatcherId ));
425
424
$ sessionStrategyId = 'security.authentication.session_strategy ' ;
426
425
427
426
$ container
@@ -490,7 +489,7 @@ private function createFirewall(ContainerBuilder $container, string $id, array $
490
489
491
490
// Authentication listeners
492
491
$ firewallAuthenticationProviders = [];
493
- [$ authListeners , $ defaultEntryPoint ] = $ this ->createAuthenticationListeners ($ container , $ id , $ firewall , $ firewallAuthenticationProviders , $ defaultProvider , $ providerIds , $ configuredEntryPoint, $ contextListenerId );
492
+ [$ authListeners , $ defaultEntryPoint ] = $ this ->createAuthenticationListeners ($ container , $ id , $ firewall , $ firewallAuthenticationProviders , $ defaultProvider , $ providerIds , $ configuredEntryPoint );
494
493
495
494
// $configuredEntryPoint is resolved into a service ID and stored in $defaultEntryPoint
496
495
$ configuredEntryPoint = $ defaultEntryPoint ;
@@ -596,7 +595,7 @@ private function createContextListener(ContainerBuilder $container, string $cont
596
595
return $ this ->contextListeners [$ contextKey ] = $ listenerId ;
597
596
}
598
597
599
- private function createAuthenticationListeners (ContainerBuilder $ container , string $ id , array $ firewall , array &$ authenticationProviders , ?string $ defaultProvider , array $ providerIds , ?string $ defaultEntryPoint, string $ contextListenerId = null )
598
+ private function createAuthenticationListeners (ContainerBuilder $ container , string $ id , array $ firewall , array &$ authenticationProviders , ?string $ defaultProvider , array $ providerIds , ?string $ defaultEntryPoint )
600
599
{
601
600
$ listeners = [];
602
601
$ entryPoints = [];
@@ -605,7 +604,7 @@ private function createAuthenticationListeners(ContainerBuilder $container, stri
605
604
$ key = str_replace ('- ' , '_ ' , $ factory ->getKey ());
606
605
607
606
if (isset ($ firewall [$ key ])) {
608
- $ userProvider = $ this ->getUserProvider ($ container , $ id , $ firewall , $ key , $ defaultProvider , $ providerIds, $ contextListenerId );
607
+ $ userProvider = $ this ->getUserProvider ($ container , $ id , $ firewall , $ key , $ defaultProvider , $ providerIds );
609
608
610
609
if (!$ factory instanceof AuthenticatorFactoryInterface) {
611
610
throw new InvalidConfigurationException (sprintf ('Authenticator factory "%s" ("%s") must implement "%s". ' , get_debug_type ($ factory ), $ key , AuthenticatorFactoryInterface::class));
@@ -637,7 +636,7 @@ private function createAuthenticationListeners(ContainerBuilder $container, stri
637
636
return [$ listeners , $ defaultEntryPoint ];
638
637
}
639
638
640
- private function getUserProvider (ContainerBuilder $ container , string $ id , array $ firewall , string $ factoryKey , ?string $ defaultProvider , array $ providerIds, ? string $ contextListenerId ): string
639
+ private function getUserProvider (ContainerBuilder $ container , string $ id , array $ firewall , string $ factoryKey , ?string $ defaultProvider , array $ providerIds ): string
641
640
{
642
641
if (isset ($ firewall [$ factoryKey ]['provider ' ])) {
643
642
if (!isset ($ providerIds [$ normalizedName = str_replace ('- ' , '_ ' , $ firewall [$ factoryKey ]['provider ' ])])) {
@@ -647,10 +646,6 @@ private function getUserProvider(ContainerBuilder $container, string $id, array
647
646
return $ providerIds [$ normalizedName ];
648
647
}
649
648
650
- if ('remember_me ' === $ factoryKey && $ contextListenerId ) {
651
- $ container ->getDefinition ($ contextListenerId )->addTag ('security.remember_me_aware ' , ['id ' => $ id , 'provider ' => 'none ' ]);
652
- }
653
-
654
649
if ($ defaultProvider ) {
655
650
return $ defaultProvider ;
656
651
}
0 commit comments