Installation
Install Rate Limit with Composer.
shell
composer require raxos/rate-limitRequirements
- PHP 8.5 or newer.
- A Redis server when using the built in
RedisRateLimiterStore.
The package declares no PHP extension requirements of its own. Redis access is handled through raxos/cache, so its requirements apply when you use the Redis backed store.
Raxos dependencies
Rate Limit builds on a small set of other Raxos packages, which Composer installs for you:
- raxos/cache provides the
RedisCacheandRedisTaggedCacheclients used byRedisRateLimiterStore. - raxos/foundation supplies shared base utilities.
- raxos/http provides the
HttpRequestandHttpResponseobjects used by the router middleware. - raxos/router defines the
MiddlewareInterfacethatRateLimitedimplements.
The RateLimiterStoreInterface and RateLimitExceptionInterface types live in raxos/contract.
Return to the Rate Limit introduction.