8000 [FrameworkBundle][RateLimiter] deprecate `RateLimiterFactory` alias by kbond · Pull Request #60171 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle][RateLimiter] deprecate RateLimiterFactory alias #60171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[FrameworkBundle][RateLimiter] deprecate RateLimiterFactory alias
  • Loading branch information
kbond authored and nicolas-grekas committed Apr 8, 2025
commit e4aa3a5bfddf5bab3a72046de5d55450d51503fa
1 change: 1 addition & 0 deletions UPGRADE-7.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ FrameworkBundle
because its default value will change in version 8.0
* Deprecate the `--show-arguments` option of the `container:debug` command, as arguments are now always shown
* Deprecate the `framework.validation.cache` config option
* Deprecate the `RateLimiterFactory` autowiring aliases, use `RateLimiterFactoryInterface` instead
* Deprecate setting the `framework.profiler.collect_serializer_data` config option to `false`

When set to `true`, normalizers must be injected using the `NormalizerInterface`, and not using any concrete implementation.
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ CHANGELOG
the `#[AsController]` attribute is no longer required
* Deprecate setting the `framework.profiler.collect_serializer_data` config option to `false`
* Set `framework.rate_limiter.limiters.*.lock_factory` to `auto` by default
* Deprecate `RateLimiterFactory` autowiring aliases, use `RateLimiterFactoryInterface` instead

7.2
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3266,10 +3266,11 @@ private function registerRateLimiterConfiguration(array $config, ContainerBuilde
$limiterConfig['id'] = $name;
$limiter->replaceArgument(0, $limiterConfig);

$container->registerAliasForArgument($limiterId, RateLimiterFactory::class, $name.'.limiter');
$factoryAlias = $container->registerAliasForArgument($limiterId, RateLimiterFactory::class, $name.'.limiter');

if (interface_exists(RateLimiterFactoryInterface::class)) {
$container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter');
$factoryAlias->setDeprecated('symfony/dependency-injection', '7.3', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.');
}
}
}
Expand Down
Loading
0