Skip to content

Commit 0df5616

Browse files
committed
feature #38664 [RateLimiter] Moved classes implementing LimiterInterface to a new namespace (Nyholm)
This PR was squashed before being merged into the 5.2-dev branch. Discussion ---------- [RateLimiter] Moved classes implementing LimiterInterface to a new namespace | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | no | Deprecations? | no? | Tickets | | License | MIT | Doc PR | Before we release the RateLimit component. I think it would be a good idea to put the 7 classes that belongs to a specific strategy in their own "Policy" namespace. It is very likely that it will be more strategies in the future and the `Symfony\Component\RateLimiter` namespace is crowed as it is. I decided not to put the `CompoundLimiter` in this namespace as it is not a strategy. Commits ------- 1e6cea56e4 [RateLimiter] Moved classes implementing LimiterInterface to a new namespace
2 parents f8856ff + 0848c2b commit 0df5616

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/EventListener/LoginThrottlingListenerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ protected function setUp(): void
3737

3838
$localLimiter = new RateLimiterFactory([
3939
'id' => 'login',
40-
'strategy' => 'fixed_window',
40+
'policy' => 'fixed_window',
4141
'limit' => 3,
4242
'interval' => '1 minute',
4343
], new InMemoryStorage());
4444
$globalLimiter = new RateLimiterFactory([
4545
'id' => 'login',
46-
'strategy' => 'fixed_window',
46+
'policy' => 'fixed_window',
4747
'limit' => 6,
4848
'interval' => '1 minute',
4949
], new InMemoryStorage());

0 commit comments

Comments
 (0)