PHPackages                             spiral-packages/rate-limiter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. spiral-packages/rate-limiter

ActiveLibrary[Caching](/categories/caching)

spiral-packages/rate-limiter
============================

A simple to use rate limiting abstraction which, in conjunction with your application's cache, provides an easy way to limit any action during a specified window of time.

259[1 issues](https://github.com/spiral-packages/rate-limiter/issues)[2 PRs](https://github.com/spiral-packages/rate-limiter/pulls)PHP

Since Jun 23Pushed 2y ago2 watchersCompare

[ Source](https://github.com/spiral-packages/rate-limiter)[ Packagist](https://packagist.org/packages/spiral-packages/rate-limiter)[ RSS](/packages/spiral-packages-rate-limiter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

A rate limiter for Spiral Framework.
====================================

[](#a-rate-limiter-for-spiral-framework)

[![PHP](https://camo.githubusercontent.com/aff6e123831953d7061ff2b2fb5ffe839ae00c819ca06e52a74e92ff0766f00d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f73706972616c2d7061636b616765732f726174652d6c696d697465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spiral-packages/rate-limiter)[![Latest Version on Packagist](https://camo.githubusercontent.com/59f02033bf3ca9f093a7b6eeb807d2e30ce84f064a718e344b52803ca7b60c44/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73706972616c2d7061636b616765732f726174652d6c696d697465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spiral-packages/rate-limiter)[![GitHub Tests Action Status](https://camo.githubusercontent.com/9d2d1aba0e726c9036c30a4043fd33305ee8a55dcc6218c35068be5376b30d7a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f73706972616c2d7061636b616765732f726174652d6c696d697465722f72756e2d74657374733f6c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/spiral-packages/rate-limiter/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/e6f7843f0718e32bde10ea6a95b53bb89866a0c9a8ddf922db815b898e88f6c8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73706972616c2d7061636b616765732f726174652d6c696d697465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spiral-packages/rate-limiter)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Requirements
------------

[](#requirements)

Make sure that your server is configured with following PHP version and extensions:

- PHP 8.1+
- Spiral framework 3.0+

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require spiral-packages/rate-limiter
```

After package install you need to register bootloader from the package.

```
protected const LOAD = [
    // ...
    \Spiral\RateLimiter\Bootloader\RateLimiterBootloader::class,
];
```

> Note: if you are using [`spiral-packages/discoverer`](https://github.com/spiral-packages/discoverer), you don't need to register bootloader by yourself.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [butschster](https://github.com/butschster)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/773481?v=4)[Pavel Buchnev](/maintainers/butschster)[@butschster](https://github.com/butschster)

---

Top Contributors

[![butschster](https://avatars.githubusercontent.com/u/773481?v=4)](https://github.com/butschster "butschster (13 commits)")

### Embed Badge

![Health badge](/badges/spiral-packages-rate-limiter/health.svg)

```
[![Health](https://phpackages.com/badges/spiral-packages-rate-limiter/health.svg)](https://phpackages.com/packages/spiral-packages-rate-limiter)
```

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
