PHPackages                             silencenjoyer/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. silencenjoyer/rate-limiter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

silencenjoyer/rate-limiter
==========================

A rate limiter to control and manage execution flow.

3.0.0(12mo ago)0251MITPHPPHP ^7.4|^8.0

Since Nov 16Pushed 12mo ago1 watchersCompare

[ Source](https://github.com/silencenjoyer/rate-limiter)[ Packagist](https://packagist.org/packages/silencenjoyer/rate-limiter)[ Docs](https://github.com/silencenjoyer/redis-counter)[ RSS](/packages/silencenjoyer-rate-limiter/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (1)Versions (4)Used By (1)

Short description of the package
================================

[](#short-description-of-the-package)

This package provides possibility to control and manage execution flow.

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

[](#installation)

You can install the package via composer:

```
composer require silencenjoyer/rate-limiter
```

Usage
-----

[](#usage)

```
use Silencenjoyer\RateLimit\Counters\LocalCounter;
use Silencenjoyer\RateLimit\Intervals\Interval;
use Silencenjoyer\RateLimit\Limiters\RateLimiter;
use Silencenjoyer\RateLimit\Rates\Rate;

require_once __DIR__ . '/vendor/autoload.php';

$counter = new LocalCounter();
$rateLimiter = new RateLimiter($counter, new Rate(5, new Interval('PT1S')));

if (!$rateLimiter->isExceed()) {
    $rateLimiter->collectUsage();
    // do some logic
}
throw new RuntimeException('Rate limit has been exceeded.');
```

### Testing

[](#testing)

```
composer test
composer test-coverage
docker-compose -f tests/docker/docker-compose.test.yml up
```

### Changelog

[](#changelog)

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

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

[](#contributing)

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

### Security

[](#security)

If you discover any security related issues, please email [an\_gebrich@outlook.com](mailto:an_gebrich@outlook.com) instead of using the issue tracker.

Credits
-------

[](#credits)

- [Andrew Gebrich](https://github.com/silencenjoyer)

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance50

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~117 days

Total

3

Last Release

360d ago

Major Versions

1.0.0 → 2.0.02025-03-15

2.0.0 → 3.0.02025-07-09

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/92015969?v=4)[Andrii Gebrych](/maintainers/Silencenjoyer)[@silencenjoyer](https://github.com/silencenjoyer)

---

Top Contributors

[![silencenjoyer](https://avatars.githubusercontent.com/u/92015969?v=4)](https://github.com/silencenjoyer "silencenjoyer (7 commits)")

---

Tags

rate-limitersilencenjoyer

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[symfony/rate-limiter

Provides a Token Bucket implementation to rate limit input and output in your application

27054.3M290](/packages/symfony-rate-limiter)[biostate/filament-menu-builder

An Elegant Menu Builder for FilamentPHP

6528.1k2](/packages/biostate-filament-menu-builder)[oaklabs/phalcon-throttler

Rate limiter PHP Phalcon Framework.

182.7k](/packages/oaklabs-phalcon-throttler)

PHPackages © 2026

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