Skip to content

Commit 890f753

Browse files
Merge branch '7.3' into 7.4
* 7.3: fix package name in deprecation message [Intl] Fix locale validator when canonicalize is true Update GitHub PR template [FrameworkBundle] also deprecate the internal rate limiter factory alias [Notifier] Update fake SMS transports to use contracts event dispatcher. [VarDumper] Remove duplicate default caster for Socket
2 parents fc53854 + 9f5a540 commit 890f753

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 7 additions & 2 deletions
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;
@@ -3310,8 +3311,12 @@ private function registerRateLimiterConfiguration(array $config, ContainerBuilde
33103311

33113312
if (interface_exists(RateLimiterFactoryInterface::class)) {
33123313
$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+
}
33153320
}
33163321
}
33173322

0 commit comments

Comments
 (0)