Skip to content

Commit

Permalink
Merge branch '5.3' into 5.4
Browse files Browse the repository at this point in the history
* 5.3:
  Remove more dynamic properties
  [Serializer] fix support for unset properties on PHP < 7.4
  • Loading branch information
nicolas-grekas committed Nov 17, 2021
2 parents c21c697 + 2183551 commit 9392f30
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Policy/TokenBucket.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/
final class TokenBucket implements LimiterStateInterface
{
private $stringRate;
private $id;
private $rate;

Expand All @@ -46,6 +47,8 @@ final class TokenBucket implements LimiterStateInterface
*/
public function __construct(string $id, int $initialTokens, Rate $rate, float $timer = null)
{
unset($this->stringRate);

if ($initialTokens < 1) {
throw new \InvalidArgumentException(sprintf('Cannot set the limit of "%s" to 0, as that would never accept any hit.', TokenBucketLimiter::class));
}
Expand Down

0 comments on commit 9392f30

Please sign in to comment.