Skip to content

simplify the PHP config example for compound rate limiters #20931

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions rate_limiter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -622,21 +622,15 @@
->policy('fixed_window')
->limit(2)
->interval('1 minute')
;

$framework->rateLimiter()
->limiter('two_per_minute')
->policy('fixed_window')
->limit(5)
->interval('1 hour')
;

$framework->rateLimiter()
->limiter('contact_form')
->policy('compound')
->limiters(['two_per_minute', 'five_per_hour'])
;
};

Check failure on line 633 in rate_limiter.rst

View workflow job for this annotation

GitHub Actions / Code Blocks

[Cache Warmup] 2025-05-01T13:26:06+00:00 [critical] Uncaught Error: Call to undefined method Symfony\Config\Framework\RateLimiter\LimiterConfig::limiter()

Then, inject and use as normal::

Expand Down
Loading