File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 13
13
14
14
use Symfony \Component \HttpFoundation \RateLimiter \AbstractRequestRateLimiter ;
15
15
use Symfony \Component \HttpFoundation \Request ;
16
- use Symfony \Component \RateLimiter \Limiter ;
16
+ use Symfony \Component \RateLimiter \RateLimiter ;
17
17
use Symfony \Component \Security \Core \Security ;
18
18
19
19
/**
@@ -31,7 +31,7 @@ final class DefaultLoginRateLimiter extends AbstractRequestRateLimiter
31
31
private $ globalLimiter ;
32
32
private $ localLimiter ;
33
33
34
- public function __construct (Limiter $ globalLimiter , Limiter $ localLimiter )
34
+ public function __construct (RateLimiter $ globalLimiter , RateLimiter $ localLimiter )
35
35
{
36
36
$ this ->globalLimiter = $ globalLimiter ;
37
37
$ this ->localLimiter = $ localLimiter ;
Original file line number Diff line number Diff line change 14
14
use PHPUnit \Framework \TestCase ;
15
15
use Symfony \Component \HttpFoundation \Request ;
16
16
use Symfony \Component \HttpFoundation \RequestStack ;
17
- use Symfony \Component \RateLimiter \Limiter ;
17
+ use Symfony \Component \RateLimiter \RateLimiter ;
18
18
use Symfony \Component \RateLimiter \Storage \InMemoryStorage ;
19
19
use Symfony \Component \Security \Core \Authentication \Token \TokenInterface ;
20
20
use Symfony \Component \Security \Core \Exception \TooManyLoginAttemptsAuthenticationException ;
@@ -35,13 +35,13 @@ protected function setUp(): void
35
35
{
36
36
$ this ->requestStack = new RequestStack ();
37
37
38
- $ localLimiter = new Limiter ([
38
+ $ localLimiter = new RateLimiter ([
39
39
'id ' => 'login ' ,
40
40
'strategy ' => 'fixed_window ' ,
41
41
'limit ' => 3 ,
42
42
'interval ' => '1 minute ' ,
43
43
], new InMemoryStorage ());
44
- $ globalLimiter = new Limiter ([
44
+ $ globalLimiter = new RateLimiter ([
45
45
'id ' => 'login ' ,
46
46
'strategy ' => 'fixed_window ' ,
47
47
'limit ' => 6 ,
You can’t perform that action at this time.
0 commit comments