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

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

zhuchunshu/hyperf-captcha
=========================

A CAPTCHA package for Hyperf Framework

v1.0.0(3y ago)0996[1 PRs](https://github.com/zhuchunshu/hyperf-captcha/pulls)MITPHPPHP &gt;=7.3

Since Feb 6Pushed 3y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (13)Versions (3)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 zhuchunshu/hyperf-captcha
```

发布配置
----

[](#发布配置)

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

> 字体文件默认发布到 `/resources/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 Inkedus\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

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

1189d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48b06512b65848936eaa00bb25e52afd04e0ddd9fe034d892ba1b65ab67956e2?d=identicon)[Inkedus](/maintainers/Inkedus)

---

Top Contributors

[![zhuchunshu](https://avatars.githubusercontent.com/u/57830364?v=4)](https://github.com/zhuchunshu "zhuchunshu (2 commits)")

---

Tags

phphyperf

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

PHPackages © 2026

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