From fc1844934d988e04d0bf6a8246cb0349c09d7c89 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Sun, 5 Feb 2023 15:04:44 +0100 Subject: [PATCH] Adding `reset()` Page: https://symfony.com/doc/5.4/rate_limiter.html#rate-limiting-in-action Wasn't mentioned anywhere... --- rate_limiter.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rate_limiter.rst b/rate_limiter.rst index a99c01191af..6ace5a6af67 100644 --- a/rate_limiter.rst +++ b/rate_limiter.rst @@ -249,10 +249,11 @@ the number of requests to the API:: // RateLimitExceededException if the limit has been reached // $limiter->consume(1)->ensureAccepted(); + // to reset the counter + // $limiter->reset(); + // ... } - - // ... } .. note::