Skip to content

Commit 80ee756

Browse files
[RateLimiter] Add RateLimiterFactoryInterface
1 parent 4b5a8ac commit 80ee756

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ CHANGELOG
99
* Add JsonEncoder services and configuration
1010
* Add new `framework.property_info.with_constructor_extractor` option to allow enabling or disabling the constructor extractor integration
1111
* Deprecate the `--show-arguments` option of the `container:debug` command, as arguments are now always shown
12+
* Add `RateLimiterFactoryInterface` as an alias of the `limiter` service
1213

1314
7.2
1415
---

Resources/config/rate_limiter.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
1313

1414
use Symfony\Component\RateLimiter\RateLimiterFactory;
15+
use Symfony\Component\RateLimiter\RateLimiterFactoryInterface;
1516

1617
return static function (ContainerConfigurator $container) {
1718
$container->services()
@@ -27,4 +28,9 @@
2728
null,
2829
])
2930
;
31+
32+
if (interface_exists(RateLimiterFactoryInterface::class)) {
33+
$container->services()
34+
->alias(RateLimiterFactoryInterface::class, 'limiter');
35+
}
3036
};

0 commit comments

Comments
 (0)