ady/captcha-bundle
Composer 安装命令:
composer require ady/captcha-bundle
包简介
User and privacy friendly captcha for your Symfony project
README 文档
README
CaptchaBundle
[](https://gitlab.com/adynemo/captchabundle/-/commits/main) [](https://gitlab.com/adynemo/captchabundle/-/commits/main)Overview
Make your website more secure and keep the robots away!
This bundle allows you to add a simple and privacy-friendly captcha to your Symfony's forms.
No Google dependency or other third party. This is just a simple challenge, a random question that the user have to answer to validate the form.
Requirements
| Support | Version |
|---|---|
| Symfony | ^4.0 / ^5.0 |
| PHP | ^7.2 / ^8.0 |
Installation
composer require ady/captcha-bundle --prefer-dist
Use
Add field
Add a new field to your form with CaptchaType. Some options are recommended:
mappedshould set tofalseif your form is mapped to an entityrequiredshould set totrue
So, your captcha field looks like:
use Ady\Bundle\CaptchaBundle\Form\CaptchaType;
->add('captcha', CaptchaType::class, [
'mapped' => false,
'required' => true,
])
Available challenges
- Consonant
Question: What is the third consonant of the word BARBITURIQUE?
Answer: B
- Letter
Question: What is the fifth letter of the word ESCARPOLETTE?
Answer: R
- Vowel
Question: What is the first vowel of the word JACTANCE?
Answer: A
Mechanism
The question is design like What is the %index% %letter% of the word %word%?. The challenge is chosen randomly among available challenges. The chosen challenge defines the %letter% and set at random the %index%. Then, the %word% is also pick off randomly from batch of words (see Dictionary).
New captcha
You can create your own captcha. It should extend AbstractCaptcha and it must implement CaptchaInterface, that's it!
Contributing
You can propose new captcha or any improvement. To do that, thanks to fork this repository and to submit one merge request. Add some unit test is appreciated. Be sure to run composer test before submitting your code.
Also, if you have any issue, please submit it on:
ady/captcha-bundle 适用场景与选型建议
ady/captcha-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.83k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 08 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 ady/captcha-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ady/captcha-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.83k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-08-07