thamtech / yii2-ratelimiter-advanced

Advanced Rate Limiter is a Yii2 filter to enforce or monitor request rate limits.
Other
38 stars 1 forks source link

RateLimitInterface should define isActive() method #3

Closed tyler-ham closed 4 years ago

tyler-ham commented 4 years ago

The RateLimit class defines isActive($context, $rateLimitId) and the RateLimiterComponent class relies on this method. This isActive() method should have been included in the RateLimitInterface.

If you've implemented RateLimitInterface without the isActive method, we'd expect a method-not-found exception to be thrown.

Workaround: Implement isActive($context, $rateLimitId) on any class that implements RateLimitInterface.

Solution: Define isActive() in RateLimitInterface