PHPackages                             ella123/hyperf-throttle - 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. ella123/hyperf-throttle

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

ella123/hyperf-throttle
=======================

hyperf throttle rate limit

3.1.14(1y ago)145MITPHPPHP &gt;=8.1

Since May 31Pushed 1y ago1 watchersCompare

[ Source](https://github.com/WenKaiYang/hyperf-throttle)[ Packagist](https://packagist.org/packages/ella123/hyperf-throttle)[ RSS](/packages/ella123-hyperf-throttle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (12)Versions (4)Used By (0)

hyperf-throttle
---------------

[](#hyperf-throttle)

> 适配 [hyperf](https://hyperf.wiki/) 框架的请求频率限流器。

### 安装依赖

[](#安装依赖)

```
composer require ella123/hyperf-throttle
```

### 发布配置

[](#发布配置)

```
php bin/hyperf.php vendor:publish ella123/hyperf-throttle
```

### 注解说明

[](#注解说明)

配置默认值说明limit60限制频次timer60时间周期（单位：s）keynull标识Key(支持自定义回调)callbacknull超频回调(支持自定义回调)### 使用实例

[](#使用实例)

---

- 支持类
- 支持方法

```
/**
 * 频率限制
 */
#[\Ella123\HyperfThrottle\Annotation\Throttle(limit: 60,timer: 60)]
class A {
    #[\Ella123\HyperfThrottle\Annotation\Throttle(limit: 60,timer: 60)]
    public function name() {
    }
}

/**
 * 重复提交
 */
#[\Ella123\HyperfThrottle\Annotation\Resubmit(limit: 1,timer: 60)]
class B {
    #[\Ella123\HyperfThrottle\Annotation\Resubmit(limit: 1,timer: 60)]
    public function submit() {
    }
}

/**
 * 短信限制(支持定义不同规则)
 */
#[\Ella123\HyperfThrottle\Annotation\SmsMinuteLimit(limit: 1,timer: 60)]
#[\Ella123\HyperfThrottle\Annotation\SmsHourLimit(limit: 5,timer: 3600)]
#[\Ella123\HyperfThrottle\Annotation\SmsDayLimit(limit: 15,timer: 86400)]
class C {
    #[\Ella123\HyperfThrottle\Annotation\SmsMinuteLimit(limit: 1,timer: 60)]
    #[\Ella123\HyperfThrottle\Annotation\SmsHourLimit(limit: 5,timer: 3600)]
    #[\Ella123\HyperfThrottle\Annotation\SmsDayLimit(limit: 15,timer: 86400)]
    public function send() {
    }
}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Total

2

Last Release

708d ago

Major Versions

2.2.13 → 3.1.142024-05-31

PHP version history (2 changes)2.2.13PHP &gt;=8.0

3.1.14PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a621d9d09087893e4f566f3101143490a234cd75234d3a34f7c8069c280f370?d=identicon)[WenKaiYang](/maintainers/WenKaiYang)

---

Top Contributors

[![WenKaiYang](https://avatars.githubusercontent.com/u/25893287?v=4)](https://github.com/WenKaiYang "WenKaiYang (48 commits)")

---

Tags

phpthrottlehyperfhyperf3.1

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ella123-hyperf-throttle/health.svg)

```
[![Health](https://phpackages.com/badges/ella123-hyperf-throttle/health.svg)](https://phpackages.com/packages/ella123-hyperf-throttle)
```

###  Alternatives

[hyperf/websocket-server

A websocket server library for Hyperf.

12488.7k25](/packages/hyperf-websocket-server)

PHPackages © 2026

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