PHPackages                             avaibook/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. [HTTP &amp; Networking](/categories/http)
4. /
5. avaibook/symfony-rate-limiter

ActiveLibrary[HTTP &amp; Networking](/categories/http)

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

Sf4.4 compatibility patch of Symfony RateLimiter component, that provides a Token Bucket implementation to rate limit input and output in your application

4.4(4y ago)318.3k↓34.8%MITPHPPHP &gt;=7.2.5

Since Oct 6Pushed 4y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Rate Limiter Component Fork (Compatible with Symfony &lt;=4.4)
==============================================================

[](#rate-limiter-component-fork-compatible-with-symfony-44)

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

This is a fork of the [original bundle](https://github.com/symfony/rate-limiter) that makes it compatible with Symfony &lt;= 4.4.

**This Component is experimental**. [Experimental features](https://symfony.com/doc/current/contributing/code/experimental.html)are not covered by Symfony's [Backward Compatibility Promise](https://symfony.com/doc/current/contributing/code/bc.html).

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

[](#getting-started)

```
$ composer require avaibook/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

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Unknown

Total

1

Last Release

1686d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3df001b2cc7954726dc59b0ec972ed79fcefc98aa0b5a183a8bc22a4fa3b4e95?d=identicon)[klke](/maintainers/klke)

---

Top Contributors

[![klke](https://avatars.githubusercontent.com/u/9321442?v=4)](https://github.com/klke "klke (3 commits)")

---

Tags

limiterrate-limiter

### Embed Badge

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

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

###  Alternatives

[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k63.6M233](/packages/nelmio-api-doc-bundle)[php-http/client-common

Common HTTP Client implementations and tools for HTTPlug

1.1k225.5M571](/packages/php-http-client-common)[symfony/rate-limiter

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

27047.2M147](/packages/symfony-rate-limiter)[kriswallsmith/buzz

Lightweight HTTP client

2.0k31.3M443](/packages/kriswallsmith-buzz)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[friendsofsymfony/http-cache

Tools to manage HTTP caching proxies with PHP

36114.7M36](/packages/friendsofsymfony-http-cache)

PHPackages © 2026

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