diff --git a/Exception/MaxWaitDurationExceededException.php b/Exception/MaxWaitDurationExceededException.php index 53029ac..4c18f6e 100644 --- a/Exception/MaxWaitDurationExceededException.php +++ b/Exception/MaxWaitDurationExceededException.php @@ -18,7 +18,7 @@ */ class MaxWaitDurationExceededException extends \RuntimeException { - private RateLimit $rateLimit; + private $rateLimit; public function __construct(string $message, RateLimit $rateLimit, int $code = 0, \Throwable $previous = null) { diff --git a/Exception/RateLimitExceededException.php b/Exception/RateLimitExceededException.php index adbe576..7bf39be 100644 --- a/Exception/RateLimitExceededException.php +++ b/Exception/RateLimitExceededException.php @@ -18,7 +18,7 @@ */ class RateLimitExceededException extends \RuntimeException { - private RateLimit $rateLimit; + private $rateLimit; public function __construct(RateLimit $rateLimit, int $code = 0, \Throwable $previous = null) { diff --git a/Policy/ResetLimiterTrait.php b/Policy/ResetLimiterTrait.php index e060d73..0f236e9 100644 --- a/Policy/ResetLimiterTrait.php +++ b/Policy/ResetLimiterTrait.php @@ -11,13 +11,11 @@ namespace Symfony\Component\RateLimiter\Policy; -use Symfony\Component\Lock\LockInterface; -use Symfony\Component\RateLimiter\Storage\StorageInterface; trait ResetLimiterTrait { - private LockInterface $lock; - private StorageInterface $storage; + private $lock; + private $storage; private string $id; /** diff --git a/Policy/TokenBucket.php b/Policy/TokenBucket.php index 21fe401..678cd76 100644 --- a/Policy/TokenBucket.php +++ b/Policy/TokenBucket.php @@ -22,7 +22,7 @@ final class TokenBucket implements LimiterStateInterface { private string $stringRate; private string $id; - private Rate $rate; + private $rate; private int $tokens; private int $burstSize; private float $timer; diff --git a/Policy/TokenBucketLimiter.php b/Policy/TokenBucketLimiter.php index b5fbb22..60f929c 100644 --- a/Policy/TokenBucketLimiter.php +++ b/Policy/TokenBucketLimiter.php @@ -27,7 +27,7 @@ final class TokenBucketLimiter implements LimiterInterface use ResetLimiterTrait; private int $maxBurst; - private Rate $rate; + private $rate; public function __construct(string $id, int $maxBurst, Rate $rate, StorageInterface $storage, LockInterface $lock = null) { diff --git a/RateLimiterFactory.php b/RateLimiterFactory.php index 4fcb25e..ec6d9fd 100644 --- a/RateLimiterFactory.php +++ b/RateLimiterFactory.php @@ -28,8 +28,8 @@ final class RateLimiterFactory { private array $config; - private StorageInterface $storage; - private ?LockFactory $lockFactory; + private $storage; + private $lockFactory; public function __construct(array $config, StorageInterface $storage, LockFactory $lockFactory = null) { diff --git a/Reservation.php b/Reservation.php index 9e6029a..d3336ee 100644 --- a/Reservation.php +++ b/Reservation.php @@ -17,7 +17,7 @@ final class Reservation { private float $timeToAct; - private RateLimit $rateLimit; + private $rateLimit; /** * @param float $timeToAct Unix timestamp in seconds when this reservation should act diff --git a/Storage/CacheStorage.php b/Storage/CacheStorage.php index 60396c8..e822878 100644 --- a/Storage/CacheStorage.php +++ b/Storage/CacheStorage.php @@ -19,7 +19,7 @@ */ class CacheStorage implements StorageInterface { - private CacheItemPoolInterface $pool; + private $pool; public function __construct(CacheItemPoolInterface $pool) {