Skip to content

Commit 5b29404

Browse files
feature #61155 [FrameworkBundle][SecurityBundle] Remove autowiring aliases for RateLimiterFactory (nicolas-grekas)
This PR was merged into the 8.0 branch. Discussion ---------- [FrameworkBundle][SecurityBundle] Remove autowiring aliases for `RateLimiterFactory` | Q | A | ------------- | --- | Branch? | 8.0 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | - | License | MIT Commits ------- 98a7ea3 [FrameworkBundle][SecurityBundle] Remove autowiring aliases for `RateLimiterFactory`; use `RateLimiterFactoryInterface` instead
2 parents 3b7ba23 + 98a7ea3 commit 5b29404

File tree

5 files changed

+6
-18
lines changed

5 files changed

+6
-18
lines changed

UPGRADE-8.0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ FrameworkBundle
209209
* Make `ConfigBuilderCacheWarmer` class `final`
210210
* Make `TranslationsCacheWarmer` class `final`
211211
* Make `ValidatorCacheWarmer` class `final`
212+
* Remove autowiring aliases for `RateLimiterFactory`; use `RateLimiterFactoryInterface` instead
212213

213214
HttpFoundation
214215
--------------
@@ -443,6 +444,7 @@ SecurityBundle
443444
+ algorithms: ['RS256']
444445
+ keyset: 'https://example.com/.well-known/jwks.json'
445446
```
447+
* Remove autowiring aliases for `RateLimiterFactory`; use `RateLimiterFactoryInterface` instead
446448

447449
Serializer
448450
----------

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ CHANGELOG
1313
* Make `ConfigBuilderCacheWarmer` class `final`
1414
* Make `TranslationsCacheWarmer` class `final`
1515
* Make `ValidatorCacheWarmer` class `final`
16+
* Remove autowiring aliases for `RateLimiterFactory`; use `RateLimiterFactoryInterface` instead
1617

1718
7.4
1819
---

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3296,15 +3296,7 @@ private function registerRateLimiterConfiguration(array $config, ContainerBuilde
32963296
$limiterConfig['id'] = $name;
32973297
$limiter->replaceArgument(0, $limiterConfig);
32983298

3299-
$factoryAlias = $container->registerAliasForArgument($limiterId, RateLimiterFactory::class, $name.'.limiter');
3300-
3301-
if (interface_exists(RateLimiterFactoryInterface::class)) {
3302-
$container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter', $name);
3303-
3304-
$factoryAlias->setDeprecated('symfony/framework-bundle', '7.3', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.');
3305-
$container->getAlias(\sprintf('.%s $%s.limiter', RateLimiterFactory::class, $name))
3306-
->setDeprecated('symfony/framework-bundle', '7.3', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.');
3307-
}
3299+
$container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter', $name);
33083300
}
33093301

33103302
if ($compoundLimiters && !class_exists(CompoundRateLimiterFactory::class)) {

src/Symfony/Bundle/SecurityBundle/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ CHANGELOG
88
* Remove the deprecated `algorithm` and `key` options from the OIDC token handler configuration, use `algorithms` and `keyset` instead
99
* Remove `LazyFirewallContext::__invoke()`
1010
* Make `ExpressionCacheWarmer` class `final`
11+
* Remove autowiring aliases for `RateLimiterFactory`; use `RateLimiterFactoryInterface` instead
1112

1213
7.4
1314
---

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/LoginThrottlingFactory.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,6 @@ private function registerRateLimiter(ContainerBuilder $container, string $name,
117117
$limiterConfig['id'] = $name;
118118
$limiter->replaceArgument(0, $limiterConfig);
119119

120-
$factoryAlias = $container->registerAliasForArgument($limiterId, RateLimiterFactory::class, $name.'.limiter');
121-
122-
if (interface_exists(RateLimiterFactoryInterface::class)) {
123-
$container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter', $name);
124-
125-
$factoryAlias->setDeprecated('symfony/security-bundle', '7.4', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.');
126-
$container->getAlias(\sprintf('.%s $%s.limiter', RateLimiterFactory::class, $name))
127-
->setDeprecated('symfony/security-bundle', '7.4', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.');
128-
}
120+
$container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter', $name);
129121
}
130122
}

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