PHPackages                             symfony/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. symfony/rate-limiter

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

symfony/rate-limiter
====================

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

v8.0.7(2mo ago)26847.2M—1%1320MITPHPPHP &gt;=8.4

Since Oct 2Pushed 1mo ago6 watchersCompare

[ Source](https://github.com/symfony/rate-limiter)[ Packagist](https://packagist.org/packages/symfony/rate-limiter)[ Docs](https://symfony.com)[ Fund](https://symfony.com/sponsor)[ GitHub Sponsors](https://github.com/fabpot)[ RSS](/packages/symfony-rate-limiter/feed)WikiDiscussions 8.1 Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (148)Used By (20)

Rate Limiter Component
======================

[](#rate-limiter-component)

The Rate Limiter component provides a Token Bucket implementation to rate limit input and output in your application.

Getting Started
---------------

[](#getting-started)

```
composer require symfony/rate-limiter
```

```
use Symfony\Component\RateLimiter\Storage\InMemoryStorage;
use Symfony\Component\RateLimiter\RateLimiterFactory;

$factory = new RateLimiterFactory([
    'id' => 'login',
    'policy' => 'token_bucket',
    'limit' => 10,
    'rate' => ['interval' => '15 minutes'],
], new InMemoryStorage());

$limiter = $factory->create();

// blocks until 1 token is free to use for this process
$limiter->reserve(1)->wait();
// ... execute the code

// only claims 1 token if it's free at this moment (useful if you plan to skip this process)
if ($limiter->consume(1)->isAccepted()) {
   // ... execute the code
}
```

Resources
---------

[](#resources)

- [Contributing](https://symfony.com/doc/current/contributing/index.html)
- [Report issues](https://github.com/symfony/symfony/issues) and [send Pull Requests](https://github.com/symfony/symfony/pulls)in the [main Symfony repository](https://github.com/symfony/symfony)

###  Health Score

76

—

ExcellentBetter than 100% of packages

Maintenance88

Actively maintained with recent releases

Popularity68

Solid adoption and visibility

Community45

Growing community involvement

Maturity90

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~13 days

Recently: every ~0 days

Total

148

Last Release

75d ago

Major Versions

v7.4.5 → v8.0.52026-01-27

v6.4.34 → v7.4.62026-02-25

v7.4.6 → v8.0.62026-02-25

6.4.x-dev → v7.4.72026-03-04

7.4.x-dev → 8.0.x-dev2026-03-04

PHP version history (5 changes)v5.2.0-BETA1PHP &gt;=7.2.5

v6.0.0-BETA1PHP &gt;=8.0.2

v6.1.0-BETA1PHP &gt;=8.1

v7.0.0-BETA1PHP &gt;=8.2

v8.0.0-RC1PHP &gt;=8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47313?v=4)[Fabien Potencier](/maintainers/fabpot)[@fabpot](https://github.com/fabpot)

---

Top Contributors

[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (126 commits)")[![fabpot](https://avatars.githubusercontent.com/u/47313?v=4)](https://github.com/fabpot "fabpot (42 commits)")[![xabbuh](https://avatars.githubusercontent.com/u/1957048?v=4)](https://github.com/xabbuh "xabbuh (24 commits)")[![derrabus](https://avatars.githubusercontent.com/u/1506493?v=4)](https://github.com/derrabus "derrabus (17 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (12 commits)")[![wouterj](https://avatars.githubusercontent.com/u/749025?v=4)](https://github.com/wouterj "wouterj (11 commits)")[![chalasr](https://avatars.githubusercontent.com/u/7502063?v=4)](https://github.com/chalasr "chalasr (6 commits)")[![jderusse](https://avatars.githubusercontent.com/u/578547?v=4)](https://github.com/jderusse "jderusse (4 commits)")[![Seldaek](https://avatars.githubusercontent.com/u/183678?v=4)](https://github.com/Seldaek "Seldaek (4 commits)")[![ERuban](https://avatars.githubusercontent.com/u/13186130?v=4)](https://github.com/ERuban "ERuban (3 commits)")[![keradus](https://avatars.githubusercontent.com/u/2716794?v=4)](https://github.com/keradus "keradus (3 commits)")[![OskarStark](https://avatars.githubusercontent.com/u/995707?v=4)](https://github.com/OskarStark "OskarStark (3 commits)")[![jlekowski](https://avatars.githubusercontent.com/u/1238363?v=4)](https://github.com/jlekowski "jlekowski (3 commits)")[![kbond](https://avatars.githubusercontent.com/u/127811?v=4)](https://github.com/kbond "kbond (3 commits)")[![alexandre-daubois](https://avatars.githubusercontent.com/u/2144837?v=4)](https://github.com/alexandre-daubois "alexandre-daubois (2 commits)")[![xesxen](https://avatars.githubusercontent.com/u/878599?v=4)](https://github.com/xesxen "xesxen (2 commits)")[![jhogervorst](https://avatars.githubusercontent.com/u/304065?v=4)](https://github.com/jhogervorst "jhogervorst (2 commits)")[![yceruto](https://avatars.githubusercontent.com/u/2028198?v=4)](https://github.com/yceruto "yceruto (1 commits)")[![brian978](https://avatars.githubusercontent.com/u/1440792?v=4)](https://github.com/brian978 "brian978 (1 commits)")[![DaRealFreak](https://avatars.githubusercontent.com/u/5161460?v=4)](https://github.com/DaRealFreak "DaRealFreak (1 commits)")

---

Tags

componentlimiterphprate-limitersymfonysymfony-componentlimiterrate-limiter

### Embed Badge

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

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

###  Alternatives

[symfony/ldap

Provides a LDAP client for PHP on top of PHP's ldap extension

1407.5M46](/packages/symfony-ldap)[php-soap/ext-soap-engine

An ext-soap engine implementation

443.2M7](/packages/php-soap-ext-soap-engine)[symfony/ux-toggle-password

Toggle visibility of password inputs for Symfony Forms

26508.0k5](/packages/symfony-ux-toggle-password)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[symfony/ux-cropperjs

Cropper.js integration for Symfony

19280.3k3](/packages/symfony-ux-cropperjs)[netgen/content-browser

Netgen Content Browser is a Symfony bundle that provides an interface which selects items from any kind of backend and returns the IDs of selected items back to the calling code.

14112.1k8](/packages/netgen-content-browser)

PHPackages © 2026

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