@@ -312,11 +312,10 @@ private function createFirewalls(array $config, ContainerBuilder $container): vo
312
312
if (!$ firewallAuthenticators ) {
313
313
$ authenticators [$ name ] = null ;
314
314
} else {
315
- $ firewallAuthenticatorRefs = [];
316
- foreach ($ firewallAuthenticators as $ authenticatorId ) {
317
- $ firewallAuthenticatorRefs [$ authenticatorId ] = new Reference ($ authenticatorId );
318
- }
319
- $ authenticators [$ name ] = ServiceLocatorTagPass::register ($ container , $ firewallAuthenticatorRefs );
315
+ $ authenticators [$ name ] = ServiceLocatorTagPass::register ($ container , array_map (
316
+ static fn (string $ authenticatorId ) => new Reference ($ authenticatorId ),
317
+ $ firewallAuthenticators
318
+ ));
320
319
}
321
320
$ contextId = 'security.firewall.map.context. ' .$ name ;
322
321
$ isLazy = !$ firewall ['stateless ' ] && (!empty ($ firewall ['anonymous ' ]['lazy ' ]) || $ firewall ['lazy ' ]);
@@ -625,11 +624,11 @@ private function createAuthenticationListeners(ContainerBuilder $container, stri
625
624
$ authenticators = $ factory ->createAuthenticator ($ container , $ id , $ firewall [$ key ], $ userProvider );
626
625
if (\is_array ($ authenticators )) {
627
626
foreach ($ authenticators as $ authenticator ) {
628
- $ authenticationProviders [] = $ authenticator ;
627
+ $ authenticationProviders [$ authenticator ] = $ authenticator ;
629
628
$ entryPoints [] = $ authenticator ;
630
629
}
631
630
} else {
632
- $ authenticationProviders [] = $ authenticators ;
631
+ $ authenticationProviders [$ authenticators ] = $ authenticators ;
633
632
$ entryPoints [$ key ] = $ authenticators ;
634
633
}
635
634
0 commit comments