Skip to content

Commit f4fe79d

Browse files
Merge branch '6.2' into 6.3
* 6.2: [Validator] Add missing validator translations in Polish language [HttpClient] Fix encoding some characters in query strings [SecurityBundle] Remove last usages of tag `security.remember_me_aware` [VarDumper] Dumping DateTime throws error if getTimezone is false Only update autoload_runtime.php when it changed [Intl] Update the ICU data to 73.2 [HttpClient] Force int conversion for floated multiplier for GenericRetryStrategy [FrameworkBundle] Ignore missing directories in about command Revert "[Messenger] Respect `isRetryable` decision of the retry strategy when deciding if failed message should be re-delivered" [Validator][Translator] Fix xlf files for en & fr translations. Bug introduced by #50590 Add missing EN and FR translations for newest constraints
2 parents f41e114 + ee02083 commit f4fe79d

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed

DependencyInjection/Security/Factory/RememberMeFactory.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,6 @@ public function createAuthenticator(ContainerBuilder $container, string $firewal
110110
->replaceArgument(3, $config['name'] ?? $this->options['name'])
111111
;
112112

113-
foreach ($container->findTaggedServiceIds('security.remember_me_aware') as $serviceId => $attributes) {
114-
// register ContextListener
115-
if (str_starts_with($serviceId, 'security.context_listener')) {
116-
continue;
117-
}
118-
119-
throw new \LogicException(sprintf('Symfony Authenticator Security dropped support for the "security.remember_me_aware" tag, service "%s" will no longer work as expected.', $serviceId));
120-
}
121-
122113
return $authenticatorId;
123114
}
124115

DependencyInjection/SecurityExtension.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,10 @@ private function createFirewall(ContainerBuilder $container, string $id, array $
428428
$listeners[] = new Reference('security.channel_listener');
429429

430430
$contextKey = null;
431-
$contextListenerId = null;
432431
// Context serializer listener
433432
if (false === $firewall['stateless']) {
434433
$contextKey = $firewall['context'] ?? $id;
435-
$listeners[] = new Reference($contextListenerId = $this->createContextListener($container, $contextKey, $firewallEventDispatcherId));
434+
$listeners[] = new Reference($this->createContextListener($container, $contextKey, $firewallEventDispatcherId));
436435
$sessionStrategyId = 'security.authentication.session_strategy';
437436

438437
$container
@@ -507,7 +506,7 @@ private function createFirewall(ContainerBuilder $container, string $id, array $
507506

508507
// Authentication listeners
509508
$firewallAuthenticationProviders = [];
510-
[$authListeners, $defaultEntryPoint] = $this->createAuthenticationListeners($container, $id, $firewall, $firewallAuthenticationProviders, $defaultProvider, $providerIds, $configuredEntryPoint, $contextListenerId);
509+
[$authListeners, $defaultEntryPoint] = $this->createAuthenticationListeners($container, $id, $firewall, $firewallAuthenticationProviders, $defaultProvider, $providerIds, $configuredEntryPoint);
511510

512511
// $configuredEntryPoint is resolved into a service ID and stored in $defaultEntryPoint
513512
$configuredEntryPoint = $defaultEntryPoint;
@@ -611,7 +610,7 @@ private function createContextListener(ContainerBuilder $container, string $cont
611610
return $this->contextListeners[$contextKey] = $listenerId;
612611
}
613612

614-
private function createAuthenticationListeners(ContainerBuilder $container, string $id, array $firewall, array &$authenticationProviders, ?string $defaultProvider, array $providerIds, ?string $defaultEntryPoint, string $contextListenerId = null): array
613+
private function createAuthenticationListeners(ContainerBuilder $container, string $id, array $firewall, array &$authenticationProviders, ?string $defaultProvider, array $providerIds, ?string $defaultEntryPoint): array
615614
{
616615
$listeners = [];
617616
$entryPoints = [];
@@ -620,7 +619,7 @@ private function createAuthenticationListeners(ContainerBuilder $container, stri
620619
$key = str_replace('-', '_', $factory->getKey());
621620

622621
if (isset($firewall[$key])) {
623-
$userProvider = $this->getUserProvider($container, $id, $firewall, $key, $defaultProvider, $providerIds, $contextListenerId);
622+
$userProvider = $this->getUserProvider($container, $id, $firewall, $key, $defaultProvider, $providerIds);
624623

625624
if (!$factory instanceof AuthenticatorFactoryInterface) {
626625
throw new InvalidConfigurationException(sprintf('Authenticator factory "%s" ("%s") must implement "%s".', get_debug_type($factory), $key, AuthenticatorFactoryInterface::class));
@@ -656,7 +655,7 @@ private function createAuthenticationListeners(ContainerBuilder $container, stri
656655
return [$listeners, $defaultEntryPoint];
657656
}
658657

659-
private function getUserProvider(ContainerBuilder $container, string $id, array $firewall, string $factoryKey, ?string $defaultProvider, array $providerIds, ?string $contextListenerId): ?string
658+
private function getUserProvider(ContainerBuilder $container, string $id, array $firewall, string $factoryKey, ?string $defaultProvider, array $providerIds): ?string
660659
{
661660
if (isset($firewall[$factoryKey]['provider'])) {
662661
if (!isset($providerIds[$normalizedName = str_replace('-', '_', $firewall[$factoryKey]['provider'])])) {
@@ -666,10 +665,6 @@ private function getUserProvider(ContainerBuilder $container, string $id, array
666665
return $providerIds[$normalizedName];
667666
}
668667

669-
if ('remember_me' === $factoryKey && $contextListenerId) {
670-
$container->getDefinition($contextListenerId)->addTag('security.remember_me_aware', ['id' => $id, 'provider' => 'none']);
671-
}
672-
673668
if ($defaultProvider) {
674669
return $defaultProvider;
675670
}

0 commit comments

Comments
 (0)