PHPackages                             fet/laminas-rate-limiting - 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. fet/laminas-rate-limiting

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

fet/laminas-rate-limiting
=========================

A rate limiting module for Laminas MVC applications.

0.3.0(2y ago)0838MITPHPPHP ^8.1

Since Jan 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/f-E-T/laminas-rate-limiting)[ Packagist](https://packagist.org/packages/fet/laminas-rate-limiting)[ Docs](https://github.com/f-e-t/laminas-rate-limiting)[ RSS](/packages/fet-laminas-rate-limiting/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

Introduction
============

[](#introduction)

The `fet/laminas-rate-limiting` package provides a rate limiting solution for Laminas MVC applications. It allows you to set limits on how often certain routes can be accessed within a specified time window.

Installation
============

[](#installation)

To install this package, use Composer:

```
composer require fet/laminas-rate-limiting
```

> Make sure you have Composer installed on your system before running this command.

Enable the `Fet\LaminasRateLimiting` module in your `config/application.config.php` file.

```
return [
    // ... other modules ...
    'Fet\\LaminasRateLimiting',
];
```

Configuration
=============

[](#configuration)

Define your rate limiting rules in your `module.config.php` or global configuration file.

```
return [
    'rate_limiting' => [
        'enabled' => true, // indicates whether rate limiting is enabled
        'max_requests' => 100, // max number of requests
        'window' => 60, // time window in seconds
        'routes' => [ // routes to apply rate limiting (wildcards allowed)
            'home',
            'api/*',
            'admin/*',
        ],
    ],
];
```

> If you want to limit all routes, you can use a '\*' as route name.

Storages
========

[](#storages)

As of the current release, this package exclusively supports **Redis** for backend storage.

```
return [
    'rate_limiting' => [
        // ... other config options ...
        'storage' => [
            'options' => [
                'host' => '127.0.0.1',
                'port' => 6379
            ],
        ],
    ],
];
```

Custom storage
--------------

[](#custom-storage)

If you want to provide your own storage implementation, make sure your class adheres to the `Fet\LaminasRateLimiting\Storage\StorageInterface` contract.

```
use Acme\Storage\DatabaseStorage;

return [
    'rate_limiting' => [
        // ... other config options ...
        'storage' => [
            'name' => DatabaseStorage::class, // this will be loaded via service manager
            'options' => [],
        ],
    ],
];
```

Tests
=====

[](#tests)

Run the tests with:

```
composer test
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

Total

4

Last Release

828d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc87555460306e35d17c3ede6ec071a207ba15d59d340a71380fb74b871ad659?d=identicon)[f-E-T](/maintainers/f-E-T)

---

Top Contributors

[![f-E-T](https://avatars.githubusercontent.com/u/87535893?v=4)](https://github.com/f-E-T "f-E-T (8 commits)")

---

Tags

laminasmvcrate-limitrate-limitingthrottlinglaminasmvcrate limitthrottlingrate limiting

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fet-laminas-rate-limiting/health.svg)

```
[![Health](https://phpackages.com/badges/fet-laminas-rate-limiting/health.svg)](https://phpackages.com/packages/fet-laminas-rate-limiting)
```

###  Alternatives

[davedevelopment/stiphle

Simple rate limiting/throttling for php

2567.7M9](/packages/davedevelopment-stiphle)[bandwidth-throttle/token-bucket

Implementation of the Token Bucket algorithm.

5121.9M10](/packages/bandwidth-throttle-token-bucket)[sunspikes/php-ratelimiter

A framework agnostic rate limiter for PHP

76674.1k1](/packages/sunspikes-php-ratelimiter)

PHPackages © 2026

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