PHPackages                             irooit/hyperf-captcha - 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. irooit/hyperf-captcha

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

irooit/hyperf-captcha
=====================

A CAPTCHA package for Hyperf Framework

1.0.2(4y ago)021MITPHPPHP &gt;=7.3

Since Nov 25Pushed 4y ago1 watchersCompare

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

READMEChangelogDependencies (13)Versions (4)Used By (0)

Captcha for Hyperf
==================

[](#captcha-for-hyperf)

##### This is the Captcha component for Hyperf 2.

[](#this-is-the-captcha-component-for-hyperf-2)

安装
--

[](#安装)

```
composer require irooit/hyperf-captcha
```

发布配置
----

[](#发布配置)

```
php bin/hyperf.php vendor:publish irooit/hyperf-captcha
```

> 字体文件默认发布到 `/storage/fonts` 目录。

组件依赖 `hyperf-ext/encryption` 组件加解密 `key`，依赖 `hyperf/cache` 组件暂存使用过的 `key`，您需要发布这些组件的配置：

```
php bin/hyperf.php vendor:publish hyperf-ext/encryption
php bin/hyperf.php vendor:publish hyperf/cache
```

使用
--

[](#使用)

```
use Hyperf\Utils\ApplicationContext;
use Irooit\Captcha\CaptchaFactory;

$captchaFactory = ApplicationContext::getContainer()->get(CaptchaFactory::class);

// 生成
$captcha = $captchaFactory->make();

// 验证
$captchaFactory->validate($key, $text);
```

#### 本包参考并使用以下扩展的部分逻辑及代码，特别感谢

[](#本包参考并使用以下扩展的部分逻辑及代码特别感谢)

- [Intervention Image](https://github.com/Intervention/image)
- [Mewebstudio Captcha](https://github.com/mewebstudio/captcha)
- [hyperf-ext/captcha](https://github.com/hyperf-ext/captcha)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

3

Last Release

1634d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ad3f906d2e98a353467f367677eacdaaf410f180db05d4d04c8a37d27a364d1?d=identicon)[irooit](/maintainers/irooit)

---

Top Contributors

[![irooit](https://avatars.githubusercontent.com/u/42669741?v=4)](https://github.com/irooit "irooit (5 commits)")

---

Tags

phphyperf

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/irooit-hyperf-captcha/health.svg)

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

PHPackages © 2026

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