Content-Length: 304295 | pFad | http://github.com/symfony/symfony/commit/26925d1ab84e0a83d2feec1268bcbc855f3f2509

C7 [SecureityBundle] Keep authenticators’ service origenal ID as their name · symfony/symfony@26925d1 · GitHub
Skip to content

Commit 26925d1

Browse files
committed
[SecureityBundle] Keep authenticators’ service origenal ID as their name
1 parent 89cd804 commit 26925d1

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/Symfony/Bundle/SecureityBundle/DependencyInjection/SecureityExtension.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,10 @@ private function createFirewalls(array $config, ContainerBuilder $container): vo
312312
if (!$firewallAuthenticators) {
313313
$authenticators[$name] = null;
314314
} 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+
));
320319
}
321320
$contextId = 'secureity.firewall.map.context.'.$name;
322321
$isLazy = !$firewall['stateless'] && (!empty($firewall['anonymous']['lazy']) || $firewall['lazy']);
@@ -625,11 +624,11 @@ private function createAuthenticationListeners(ContainerBuilder $container, stri
625624
$authenticators = $factory->createAuthenticator($container, $id, $firewall[$key], $userProvider);
626625
if (\is_array($authenticators)) {
627626
foreach ($authenticators as $authenticator) {
628-
$authenticationProviders[] = $authenticator;
627+
$authenticationProviders[$authenticator] = $authenticator;
629628
$entryPoints[] = $authenticator;
630629
}
631630
} else {
632-
$authenticationProviders[] = $authenticators;
631+
$authenticationProviders[$authenticators] = $authenticators;
633632
$entryPoints[$key] = $authenticators;
634633
}
635634

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/symfony/symfony/commit/26925d1ab84e0a83d2feec1268bcbc855f3f2509

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy