yiisoft / rate-limiter

RateLimiter helps to prevent abuse by limiting the number of requests that could be me made consequentially.

Home Page:https://www.yiiframework.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PSR ClockInterface instead of TimerInterface

xepozz opened this issue · comments

Should we replace \Yiisoft\Yii\RateLimiter\Time\TimerInterface with the one from https://www.php-fig.org/psr/psr-20?

PSR-20 work with DateTimeImmutable that not support milliseconds.

PSR-20 work with DateTimeImmutable that not support milliseconds.

https://3v4l.org/M5JrY

I like this idea.

Since there's a performance drop and this is heavily used middleware, decided not to do it.