@RateLimit) and event listeners, which integrates cleanly with Laravel’s Symfony bridge (e.g., symfony/http-foundation, symfony/dependency-injection).symfony/annotations, symfony/cache), which Laravel already supports via symfony/http-kernel and symfony/dependency-injection.@RateLimit), which may require Laravel’s illuminate/support polyfills or a Symfony annotation loader (e.g., ramsey/uuid for parsing).app/Http/Middleware/RateLimit.php).symfony/cache, symfony/event-dispatcher), which may conflict with Laravel’s existing stack if not managed carefully.doctrine/annotations).increment, exists) could introduce latency if not optimized (e.g., Redis pipelining).throttle) or run alongside?symfony/http-kernel for annotation parsing and symfony/cache for storage.RateLimitListener).app/Http/Middleware/RateLimit.php) for consistency.composer require noxlogic/ratelimit-bundle symfony/annotations symfony/cache
config/packages/ratelimit.yaml (Symfony-style) or adapt to Laravel’s config/ratelimit.php.@RateLimit annotation on a non-critical API endpoint.throttle middleware) with the bundle.app/Services/CustomRateLimitKeyGenerator.php).replace or aliases to manage versions.annotations, cache, event-dispatcher).config/app.php (Laravel) or config/bundles.php (Symfony).doctrine/annotations or Symfony’s AnnotationReader).RateLimitKeyGeneratorInterface).symfony/cache).RateLimitExceeded) for observability.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Cache backend down (Redis) | All rate-limiting disabled | Fallback to allow-all or file cache |
| Annotation parsing errors | Rate-limiting ignored | Validate annotations at runtime |
| Key collision (shared keys) | False positives/negatives | Use unique identifiers (e.g., user_id + ip) |
| Burst traffic | Cache thrashing | Implement pipelining or local LRU |
| PHP/Symfony version mismatch | Bundle fails to load | Pin exact versions in composer.json |
@RateLimit syntax and configuration.How can I help you explore Laravel packages today?