diff --git a/UPGRADE-8.0.md b/UPGRADE-8.0.md index c97b020152745..00927d63a0840 100644 --- a/UPGRADE-8.0.md +++ b/UPGRADE-8.0.md @@ -209,6 +209,7 @@ FrameworkBundle * Make `ConfigBuilderCacheWarmer` class `final` * Make `TranslationsCacheWarmer` class `final` * Make `ValidatorCacheWarmer` class `final` + * Remove autowiring aliases for `RateLimiterFactory`; use `RateLimiterFactoryInterface` instead HttpFoundation -------------- @@ -443,6 +444,7 @@ SecurityBundle + algorithms: ['RS256'] + keyset: 'https://example.com/.well-known/jwks.json' ``` + * Remove autowiring aliases for `RateLimiterFactory`; use `RateLimiterFactoryInterface` instead Serializer ---------- diff --git a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md index 352781a2a3fb8..e8386b8c40e94 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md +++ b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md @@ -13,6 +13,7 @@ CHANGELOG * Make `ConfigBuilderCacheWarmer` class `final` * Make `TranslationsCacheWarmer` class `final` * Make `ValidatorCacheWarmer` class `final` + * Remove autowiring aliases for `RateLimiterFactory`; use `RateLimiterFactoryInterface` instead 7.4 --- diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 57bf9da210c01..3cab6729336a6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -3296,15 +3296,7 @@ private function registerRateLimiterConfiguration(array $config, ContainerBuilde $limiterConfig['id'] = $name; $limiter->replaceArgument(0, $limiterConfig); - $factoryAlias = $container->registerAliasForArgument($limiterId, RateLimiterFactory::class, $name.'.limiter'); - - if (interface_exists(RateLimiterFactoryInterface::class)) { - $container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter', $name); - - $factoryAlias->setDeprecated('symfony/framework-bundle', '7.3', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.'); - $container->getAlias(\sprintf('.%s $%s.limiter', RateLimiterFactory::class, $name)) - ->setDeprecated('symfony/framework-bundle', '7.3', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.'); - } + $container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter', $name); } if ($compoundLimiters && !class_exists(CompoundRateLimiterFactory::class)) { diff --git a/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md b/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md index 7e7f634ce00ec..c8be539fee514 100644 --- a/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md +++ b/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md @@ -8,6 +8,7 @@ CHANGELOG * Remove the deprecated `algorithm` and `key` options from the OIDC token handler configuration, use `algorithms` and `keyset` instead * Remove `LazyFirewallContext::__invoke()` * Make `ExpressionCacheWarmer` class `final` + * Remove autowiring aliases for `RateLimiterFactory`; use `RateLimiterFactoryInterface` instead 7.4 --- diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/LoginThrottlingFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/LoginThrottlingFactory.php index b27a2483bfe49..7ef3e0661a6ff 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/LoginThrottlingFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/LoginThrottlingFactory.php @@ -117,14 +117,6 @@ private function registerRateLimiter(ContainerBuilder $container, string $name, $limiterConfig['id'] = $name; $limiter->replaceArgument(0, $limiterConfig); - $factoryAlias = $container->registerAliasForArgument($limiterId, RateLimiterFactory::class, $name.'.limiter'); - - if (interface_exists(RateLimiterFactoryInterface::class)) { - $container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter', $name); - - $factoryAlias->setDeprecated('symfony/security-bundle', '7.4', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.'); - $container->getAlias(\sprintf('.%s $%s.limiter', RateLimiterFactory::class, $name)) - ->setDeprecated('symfony/security-bundle', '7.4', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.'); - } + $container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter', $name); } }
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: