Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Ratelimit Bundle

Ratelimit Bundle Laravel Package

noxlogic/ratelimit-bundle

RateLimitBundle adds flexible, configurable rate limiting to Symfony applications. Protect APIs and routes from abuse, define custom limits and strategies, and integrate quickly with minimal boilerplate. Ideal for throttling requests and controlling traffic.

View on GitHub
Deep Wiki
Context7

Add rate limits to your controllers / actions easily through annotations

Frequently asked questions about Ratelimit Bundle
Is noxlogic/ratelimit-bundle a Laravel package?
No. It is a Symfony bundle built around Symfony's HttpKernel events and dependency injection lifecycle, so it does not register a Laravel service provider or integrate with Laravel's HTTP kernel. You can install it with Composer, but that does not make it usable as a Laravel package. For Laravel, use the framework's built-in RateLimiter and throttle middleware instead.
Can I use RateLimitBundle in a Laravel application?
Not as a drop-in. The bundle enforces limits through Symfony kernel.controller events and reads annotations or attributes from Symfony controller actions, and Laravel has no equivalent bundle registration or event layer. Bridging Symfony's HttpKernel inside Laravel is high-effort and low-value. The practical approach is to reimplement the same limit semantics with Laravel's native rate limiting.
How do I install and configure noxlogic/ratelimit-bundle?
It is installed with Composer and enabled through Symfony's bundle registration and DI configuration, with limits declared via annotations or PHP attributes on controller actions. Configuration covers storage backends and limit strategies. None of those registration steps apply to Laravel, which is why it cannot be enabled there the same way.
Does RateLimitBundle support Laravel 10, 11, or 12?
There is no supported Laravel integration. Laravel shares some individual Symfony components, but not the bundle lifecycle, service provider auto-discovery, or config publishing that a Laravel package relies on. Compatibility would depend on matching Symfony component versions with Laravel's internals, which is unsupported and fragile. Treat it as a Symfony-only solution.
How does RateLimitBundle compare to Laravel's throttle middleware?
Laravel already provides equivalent throttling through Illuminate\Cache\RateLimiter, RateLimiter::for() named limiters, and the throttle middleware on routes and groups. The bundle's differentiating feature is declarative per-action limits via annotations or attributes on controller methods. Most Laravel use cases are satisfied by per-route middleware with named limiters, so the gap rarely justifies a port.
How do I add per-route rate limiting in Laravel without this bundle?
Define named limiters in a service provider with RateLimiter::for(), keying them by IP, authenticated user ID, or a request header. Then apply them with throttle:limiterName on individual routes or route groups. For multi-window limits such as per-second plus per-minute, write a thin custom middleware that calls the limiter for each window. This keeps enforcement inside Laravel's HTTP kernel where it belongs.
Can I use annotation-based rate limits on Laravel controllers?
Not with this bundle, because its annotation reader is Symfony-routing-aware and expects Symfony controller actions. Laravel route definitions live in route files or attributes on controllers, not in the bundle's annotation model. You could replicate the idea with PHP 8 attributes plus a custom middleware, but per-route middleware is usually simpler and more explicit.
What storage backends does RateLimitBundle require?
The bundle is designed around configurable storage backends such as Redis, Memcached, or Doctrine, depending on your Symfony configuration. You need to confirm which backend your infrastructure mandates and whether the package's client constraints match your runtime. In Laravel, the cache store configured for the RateLimiter is the equivalent decision, so verify Redis or Memcached availability either way.
Is RateLimitBundle actively maintained and safe for production?
It has a single primary maintainer and reported dependents of zero, which offers little external validation even if that metric understates real usage. The Symfony side is mature and well-scoped, but the Laravel-side risk is high because there is no supported integration at all. Check the maintainer's security response history and version constraints before relying on it in any Symfony service.
What is the best alternative to RateLimitBundle for Laravel?
Laravel's native RateLimiter and throttle middleware are the recommended alternative for almost every case. If you need the bundle's internals, extract its storage and key-generation logic into a standalone library and keep enforcement in a Laravel middleware rather than booting the Symfony bundle. Building a roughly 200-line custom middleware is often cheaper than a fork-and-port. Confirm whether you truly need per-action declarative limits before adding complexity.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect