diff --git a/src/Illuminate/Redis/Limiters/DurationLimiter.php b/src/Illuminate/Redis/Limiters/DurationLimiter.php index d4e503ada980..56dbba505435 100644 --- a/src/Illuminate/Redis/Limiters/DurationLimiter.php +++ b/src/Illuminate/Redis/Limiters/DurationLimiter.php @@ -119,7 +119,7 @@ public function acquire() public function tooManyAttempts() { [$this->decaysAt, $this->remaining] = $this->redis->eval( - $this->tooManyAttemptsScript(), 1, $this->name, microtime(true), time(), $this->decay, $this->maxLocks + $this->tooManyAttemptsLuaScript(), 1, $this->name, microtime(true), time(), $this->decay, $this->maxLocks ); return $this->remaining <= 0; @@ -181,7 +181,7 @@ protected function luaScript() * * @return string */ - protected function tooManyAttemptsScript() + protected function tooManyAttemptsLuaScript() { return <<<'LUA' diff --git a/tests/Integration/Queue/ThrottlesExceptionsWithRedisTest.php b/tests/Integration/Queue/ThrottlesExceptionsWithRedisTest.php index 35d9255eb751..c789d5d523f6 100644 --- a/tests/Integration/Queue/ThrottlesExceptionsWithRedisTest.php +++ b/tests/Integration/Queue/ThrottlesExceptionsWithRedisTest.php @@ -140,7 +140,7 @@ public function handle() public function middleware() { - return [new ThrottlesExceptionsWithRedis(2, 10, 0, $this->key)]; + return [(new ThrottlesExceptionsWithRedis(2, 10))->by($this->key)]; } } @@ -162,6 +162,6 @@ public function handle() public function middleware() { - return [new ThrottlesExceptionsWithRedis(2, 10, 0, $this->key)]; + return [(new ThrottlesExceptionsWithRedis(2, 10))->by($this->key)]; } }