Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e4aa3a5

Browse filesBrowse files
kbondnicolas-grekas
authored andcommitted
[FrameworkBundle][RateLimiter] deprecate RateLimiterFactory alias
1 parent 17445a3 commit e4aa3a5
Copy full SHA for e4aa3a5

File tree

3 files changed

+4
-1
lines changed
Filter options

3 files changed

+4
-1
lines changed

‎UPGRADE-7.3.md

Copy file name to clipboardExpand all lines: UPGRADE-7.3.md
+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ FrameworkBundle
5959
because its default value will change in version 8.0
6060
* Deprecate the `--show-arguments` option of the `container:debug` command, as arguments are now always shown
6161
* Deprecate the `framework.validation.cache` config option
62+
* Deprecate the `RateLimiterFactory` autowiring aliases, use `RateLimiterFactoryInterface` instead
6263
* Deprecate setting the `framework.profiler.collect_serializer_data` config option to `false`
6364

6465
When set to `true`, normalizers must be injected using the `NormalizerInterface`, and not using any concrete implementation.

‎src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ CHANGELOG
2323
the `#[AsController]` attribute is no longer required
2424
* Deprecate setting the `framework.profiler.collect_serializer_data` config option to `false`
2525
* Set `framework.rate_limiter.limiters.*.lock_factory` to `auto` by default
26+
* Deprecate `RateLimiterFactory` autowiring aliases, use `RateLimiterFactoryInterface` instead
2627

2728
7.2
2829
---

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+2-1
Original file line numberDiff line numberDiff line change
@@ -3266,10 +3266,11 @@ private function registerRateLimiterConfiguration(array $config, ContainerBuilde
32663266
$limiterConfig['id'] = $name;
32673267
$limiter->replaceArgument(0, $limiterConfig);
32683268

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

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.