|
61 | 61 | use Symfony\Component\DependencyInjection\Alias; |
62 | 62 | use Symfony\Component\DependencyInjection\Argument\IteratorArgument; |
63 | 63 | use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; |
| 64 | +use Symfony\Component\DependencyInjection\Attribute\Target; |
64 | 65 | use Symfony\Component\DependencyInjection\ChildDefinition; |
65 | 66 | use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; |
66 | 67 | use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; |
@@ -3310,8 +3311,12 @@ private function registerRateLimiterConfiguration(array $config, ContainerBuilde |
3310 | 3311 |
|
3311 | 3312 | if (interface_exists(RateLimiterFactoryInterface::class)) { |
3312 | 3313 | $container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter'); |
3313 | | - $container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name); |
3314 | | - $factoryAlias->setDeprecated('symfony/framework-bundle', '7.3', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.'); |
| 3314 | + $factoryAlias->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())); |
| 3315 | + $internalAliasId = \sprintf('.%s $%s.limiter', RateLimiterFactory::class, $name); |
| 3316 | + |
| 3317 | + if ($container->hasAlias($internalAliasId)) { |
| 3318 | + $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())); |
| 3319 | + } |
3315 | 3320 | } |
3316 | 3321 | } |
3317 | 3322 |
|
|
0 commit comments