Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[RateLimiter] AddCalendarWindowLimiter#62127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:7.4
Are you sure you want to change the base?
[RateLimiter] AddCalendarWindowLimiter#62127
Conversation
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/RateLimiter/Policy/CalendarWindowLimiter.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/RateLimiter/Policy/CalendarWindowLimiter.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/RateLimiter/Tests/Policy/CalendarWindowTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
…move the default value
src/Symfony/Component/RateLimiter/Policy/CalendarWindowLimiter.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
…nt is not installed
Crovitche-1623 commentedOct 24, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@stof The CI seems to fail because the What should I do in this case? Rewrite the code using regular |
you need to add a dev requirement for that optional dependency. |
Are we sure it's not just a regular dependency, since it's now used in |
the clock is optional in that limiter. |
… should be optional
Everything seems fine on my end 😁. The tests that crashed in CI don't seem to be related to my code. |
Uh oh!
There was an error while loading.Please reload this page.
I was looking to rate limit an API that I proxy to another. However, the pricing for the API I am calling is based on a calendar quota (we receive the bill at the end of the month).
On Symfony, I saw that there was a
fixed_windowpolicy, which corresponds to a counter for a given interval.However, the counter seems to start when the request is made, not on a calendar basis.
I could reset the cache used by the rate_limiter at the beginning of the month to make sure it's correct, but that seemed a bit messy.
That's why I propose this
CalendarWindowLimiterthat can rate limit based on the givenCalendarIntervalenum value.The usage would be something like that :