Skip to content

Commit bdf1633

Browse files
committed
[SecurityBundle] Remove AnonymousFactory leftovers
1 parent 8819ea9 commit bdf1633

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ private function createFirewalls(array $config, ContainerBuilder $container): vo
334334
$authenticators[$name] = ServiceLocatorTagPass::register($container, $firewallAuthenticatorRefs);
335335
}
336336
$contextId = 'security.firewall.map.context.'.$name;
337-
$isLazy = !$firewall['stateless'] && (!empty($firewall['anonymous']['lazy']) || $firewall['lazy']);
337+
$isLazy = !$firewall['stateless'] || $firewall['lazy'];
338338
$context = new ChildDefinition($isLazy ? 'security.firewall.lazy_context' : 'security.firewall.context');
339339
$context = $container->setDefinition($contextId, $context);
340340
$context
@@ -685,7 +685,7 @@ private function getUserProvider(ContainerBuilder $container, string $id, array
685685
return $this->createMissingUserProvider($container, $id, $factoryKey);
686686
}
687687

688-
if ('remember_me' === $factoryKey || 'anonymous' === $factoryKey || 'custom_authenticators' === $factoryKey) {
688+
if ('remember_me' === $factoryKey || 'custom_authenticators' === $factoryKey) {
689689
if ('custom_authenticators' === $factoryKey) {
690690
trigger_deprecation('symfony/security-bundle', '5.4', 'Not configuring explicitly the provider for the "%s" firewall is deprecated because it\'s ambiguous as there is more than one registered provider. Set the "provider" key to one of the configured providers, even if your custom authenticators don\'t use it.', $id);
691691
}

0 commit comments

Comments
 (0)