Skip to content

Commit d7f6463

Browse files
committed
[FrameworkBundle] also deprecate the internal rate limiter factory alias
1 parent be33344 commit d7f6463

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
use Symfony\Component\DependencyInjection\Alias;
6262
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
6363
use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
64+
use Symfony\Component\DependencyInjection\Attribute\Target;
6465
use Symfony\Component\DependencyInjection\ChildDefinition;
6566
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6667
use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass;
@@ -3301,7 +3302,12 @@ private function registerRateLimiterConfiguration(array $config, ContainerBuilde
33013302

33023303
if (interface_exists(RateLimiterFactoryInterface::class)) {
33033304
$container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter');
3304-
$factoryAlias->setDeprecated('symfony/dependency-injection', '7.3', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.');
3305+
$factoryAlias->setDeprecated('symfony/dependency-injection', '7.3', \sprintf('The "%%alias_id%%" autowiring alias is deprecated and will be removed in 8.0, use "%s $%s" instead.', RateLimiterFactoryInterface::class, (new Target($name.'.limiter'))->getParsedName()));
3306+
$internalAliasId = \sprintf('.%s $%s.limiter', RateLimiterFactory::class, $name);
3307+
3308+
if ($container->hasAlias($internalAliasId)) {
3309+
$container->getAlias($internalAliasId)->setDeprecated('symfony/framework-bundle', '7.3', \sprintf('The "%%alias_id%%" autowiring alias is deprecated and will be removed in 8.0, use "%s $%s" instead.', RateLimiterFactoryInterface::class, (new Target($name.'.limiter'))->getParsedName()));
3310+
}
33053311
}
33063312
}
33073313

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

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:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy