Skip to content

Commit b4920e9

Browse files
wouterjfabpot
authored andcommitted
[RateLimiter] Added reserve() to LimiterInterface and rename Limiter to RateLimiter
1 parent ba217ec commit b4920e9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@
128128
use Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface;
129129
use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
130130
use Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface;
131-
use Symfony\Component\RateLimiter\Limiter;
132131
use Symfony\Component\RateLimiter\LimiterInterface;
132+
use Symfony\Component\RateLimiter\RateLimiter;
133133
use Symfony\Component\RateLimiter\Storage\CacheStorage;
134134
use Symfony\Component\Routing\Loader\AnnotationDirectoryLoader;
135135
use Symfony\Component\Routing\Loader\AnnotationFileLoader;
@@ -2266,7 +2266,7 @@ public static function registerRateLimiter(ContainerBuilder $container, string $
22662266
$limiterConfig['id'] = $name;
22672267
$limiter->replaceArgument(0, $limiterConfig);
22682268

2269-
$container->registerAliasForArgument($limiterId, Limiter::class, $name.'.limiter');
2269+
$container->registerAliasForArgument($limiterId, RateLimiter::class, $name.'.limiter');
22702270
}
22712271

22722272
private function resolveTrustedHeaders(array $headers): int

Resources/config/rate_limiter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111

1212
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
1313

14-
use Symfony\Component\RateLimiter\Limiter;
14+
use Symfony\Component\RateLimiter\RateLimiter;
1515

1616
return static function (ContainerConfigurator $container) {
1717
$container->services()
1818
->set('cache.rate_limiter')
1919
->parent('cache.app')
2020
->tag('cache.pool')
2121

22-
->set('limiter', Limiter::class)
22+
->set('limiter', RateLimiter::class)
2323
->abstract()
2424
->args([
2525
abstract_arg('config'),

0 commit comments

Comments
 (0)