fusonic/rate-limit-bundle
A Symfony bundle for declarative rate limiting. Apply attributes to controllers and services, configure limits and intervals, and use flexible storage backends to throttle APIs and protect actions with minimal setup and clean Symfony integration.
Bottom line: still a no-go on adoption. v4.0.0 ("Compatibility with PHP 8") removes one previously disqualifying obstacle — the near-certain Composer constraint collision on PHP 8.1+/Laravel 10–11 — but it does not touch any of the gates that actually decided the outcome. The package remains a Symfony bundle, not a Laravel package; it still has zero stars, zero dependents, and no support surface; and Laravel still ships a first-party equivalent (Illuminate\Cache\RateLimiter + throttle middleware) that is maintained with the framework. A PHP-version bump does not convert a foreign-ecosystem artifact into a viable Laravel dependency. The redirect to native throttling stands.
What the release changes, precisely. One claim: PHP 8 compatibility, shipped as a major version bump. That is a narrow, real improvement to the dependency-resolution risk and nothing else. It does not change the kernel/DI/bundle-model mismatch, the ecosystem abandonment, the value proposition, or the security-response posture. It is also a major-version bump accompanied by a one-line changelog with no enumerated breaking changes, no upgrade guide, and no stated PHP minor-version matrix — which is its own signal about release engineering discipline, not a reassurance.
Architecture fit — poor (still fails at the first gate).
RateLimiter component and cache pools, and hooks route metadata through Symfony's routing/event system. Nothing about a PHP 8 compatibility release changes this. Laravel has no bundle registration and a fundamentally different HTTP kernel and middleware pipeline.throttle middleware backed by Illuminate\Cache\RateLimiter, configured in RouteServiceProvider/AppServiceProvider with RateLimiter::for(). The package's value proposition — "simple rate limiting based on routes" — is already native, declarative, and testable in Laravel.Integration feasibility — low (revised: blocked later, not at step zero).
composer require was expected to fail on constraint resolution before any code was written. That specific blocker is now plausibly cleared for PHP 8.0-era constraints. Verify, do not assume: "PHP 8" is unspecific — confirm support for the PHP minors we actually run (8.2/8.3), confirm the transitive Symfony 5.x-era constraints resolve against a Laravel 10–11 graph, and confirm it installs cleanly alongside laravel/framework without pinning our framework or cache packages.symfony/rate-limiter and framework-bundle-adjacent contracts into a Laravel app, bootstrapping Symfony services alongside the Laravel container, and bridging route metadata. That is still a multi-sprint adapter project to reach parity with a one-line ->middleware('throttle:60,1').Technical risk — high (unchanged in aggregate).
Key questions (to close before any further evaluation).
throttle middleware genuinely cannot satisfy (per-tenant keys, cost-weighted limits, distributed counters)? If yes, we solve it with a first-party implementation, not this bundle.symfony/rate-limiter since 5.2, which likely supersedes this bundle even in its own ecosystem.Stack fit — not applicable / redirect (unchanged by v4.0.0). The package still does not fit a Laravel/PHP application stack. The recommended integration remains Laravel's native rate limiting: first-party, maintained with the framework, already present in every Laravel install. There is nothing to install, and v4.0.0 does not create anything to install.
Recommended target architecture.
AppServiceProvider::boot() via RateLimiter::for('api', fn (Request $r) => Limit::perMinute(60)->by($r->user()?->id ?: $r->ip())) — named limiters keyed by user, IP, tenant, or API key, with cost weighting via ->response() and ->withHeaders().throttle:<name> middleware on route groups, mirroring the route-based ergonomics the Symfony bundle advertises — without the foreign dependency.cache store redis) for multi-node deployments; array store for tests; database store only if Redis is unavailable and volume is low.RateLimitHit/RateLimitExceeded events into existing logging/metrics rather than relying on package internals.Migration path (if any Symfony-era config exists to port).
RateLimiter::for() definition in AppServiceProvider.throttle:<name> middleware to route groups; remove the Symfony service wiring and Composer dependency in the same PR.X-RateLimit-Limit, X-RateLimit-Remaining, Retry-After) so behaviour is pinned at the HTTP contract level.Compatibility.
Sequencing.
fusonic/rate-limit-bundle including v4.0.0, adopt native throttle; record the v4.0.0 review as "does not change the decision"; identify the abuse/cost objective per endpoint.If a Symfony service does exist in the estate: evaluate symfony/rate-limiter directly (framework-native since 5.2) rather than this bundle — and note that v4.0.0's PHP 8 claim is equally unverified there.
Maintenance — still the decisive factor. A single PHP 8 compatibility release does not constitute a maintenance programme. It tells us someone touched the build once; it does not tell us who triages issues, how security reports are handled, or whether a PHP 8.3/8.4 release will follow. If we adopt, we must still assume we own the entire artifact the moment it breaks: fork it, patch it, carry it indefinitely — a permanent tax for zero incremental capability. The native alternative's maintenance is carried by the Laravel release train we already track.
Support.
throttle middleware — relevant for onboarding and on-call.Scaling.
Failure modes and mitigations.
Ramp-up.
Recommendation.
Reject fusonic/rate-limit-bundle at v4.0.0. The release clears the PHP-version constraint collision and nothing else; the decisive gates all still fail — stack fit (Symfony bundle in a Laravel estate), maintenance (single unspecific revival release, no stated support or security process), ecosystem (0 stars, 0 dependents, no support surface), and value (Laravel already provides a superior native equivalent). Adopt Illuminate\Cache\RateLimiter + throttle middleware, define limits per endpoint against a documented abuse/cost objective, back them with Redis, and instrument 429s. Revisit only if (a) a Symfony service enters the estate — and even then prefer symfony/rate-limiter — or (b) the package demonstrates a sustained release cadence, a published security policy, and non-zero adoption over at least two subsequent releases.
How can I help you explore Laravel packages today?