PHPackages                             thelia/re-captcha-module - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. thelia/re-captcha-module

ActiveThelia-module[Validation &amp; Sanitization](/categories/validation)

thelia/re-captcha-module
========================

This module allows you to add easily a reCAPTCHA to your form

4.0.4(1mo ago)129.0k10[1 PRs](https://github.com/thelia-modules/ReCaptcha/pulls)LGPL-3.0+PHPCI passing

Since Jun 9Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/thelia-modules/ReCaptcha)[ Packagist](https://packagist.org/packages/thelia/re-captcha-module)[ RSS](/packages/thelia-re-captcha-module/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (2)Versions (18)Used By (0)

Re Captcha
==========

[](#re-captcha)

This module allows you to add easily a reCAPTCHA to your form

Installation
------------

[](#installation)

### Composer

[](#composer)

Add it in your main thelia composer.json file

```
composer require thelia/re-captcha-module:~2.0.0

```

Usage
-----

[](#usage)

Before using this module you have to create google api key here
next configure your reCAPTCHA access here http://your\_site.com`/admin/module/ReCaptcha` with keys you obtained in Google's page and choose which style of captcha you want :

- A standard captcha (or a compact version of this one)

    [![Checkbox captcha](https://camo.githubusercontent.com/edea3ac49b0f8ecab9889986fb29c4c49b38740b899b39d2d32e61c5b9ec5cee/68747470733a2f2f646576656c6f706572732e676f6f676c652e636f6d2f7265636170746368612f696d616765732f6e657743617074636861416e63686f722e676966)](https://camo.githubusercontent.com/edea3ac49b0f8ecab9889986fb29c4c49b38740b899b39d2d32e61c5b9ec5cee/68747470733a2f2f646576656c6f706572732e676f6f676c652e636f6d2f7265636170746368612f696d616765732f6e657743617074636861416e63686f722e676966)
- An invisible captcha

    [![Invisible captcha](https://camo.githubusercontent.com/bc30dab5846f081d485a8daecf4e1882254f62be2f0192ed227bd80c3786c19d/68747470733a2f2f646576656c6f706572732e676f6f676c652e636f6d2f7265636170746368612f696d616765732f696e76697369626c655f62616467652e706e67)](https://camo.githubusercontent.com/bc30dab5846f081d485a8daecf4e1882254f62be2f0192ed227bd80c3786c19d/68747470733a2f2f646576656c6f706572732e676f6f676c652e636f6d2f7265636170746368612f696d616765732f696e76697369626c655f62616467652e706e67)

Then you'll need help from a developer to add some hooks in template and dispatch the check events, see details below.

### Hook

[](#hook)

First if you don't have `{hook name="main.head-top"}` hook in your template you have to put this hook `{hook name="recaptcha.js"}` in the top of your head
Then add this hook `{hook name="recaptcha.check"}` in every form where you want to check if the user is human,
be careful if you want to use the invisible captcha this hook must be placed directly in the form tag like this :

```

    {hook name="recaptcha.check"}
    // End of the form

```

### Event

[](#event)

To check in server-side if the captcha is valid you have to dispatch the "CHECK\_CAPTCHA\_EVENT" like this :

```
$checkCaptchaEvent = new ReCaptchaCheckEvent();
$eventDispatcher->dispatch($checkCaptchaEvent, ReCaptchaEvents::CHECK_CAPTCHA_EVENT);

```

Then the result of check is available in `$checkCaptchaEvent->isHuman()`as boolean so you can do a test like this :

```
if ($checkCaptchaEvent->isHuman() == false) {
    throw new \Exception('Invalid captcha');
}

```

Don't forget to add this use at the top of your class :

```
use ReCaptcha\Event\ReCaptchaCheckEvent;
use ReCaptcha\Event\ReCaptchaEvents;

```

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance91

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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

Recently: every ~100 days

Total

13

Last Release

43d ago

Major Versions

1.0 → 2.0.02019-01-23

2.0.4 → 3.0.02022-08-04

3.0.1 → 4.0.02025-04-04

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2196919?v=4)[thelia](/maintainers/thelia)[@thelia](https://github.com/thelia)

---

Top Contributors

[![lopes-vincent](https://avatars.githubusercontent.com/u/6057206?v=4)](https://github.com/lopes-vincent "lopes-vincent (9 commits)")[![julescournut](https://avatars.githubusercontent.com/u/26310511?v=4)](https://github.com/julescournut "julescournut (4 commits)")[![NicolasBarbey](https://avatars.githubusercontent.com/u/26166378?v=4)](https://github.com/NicolasBarbey "NicolasBarbey (2 commits)")[![HeishPi](https://avatars.githubusercontent.com/u/27410082?v=4)](https://github.com/HeishPi "HeishPi (2 commits)")[![mabruchet](https://avatars.githubusercontent.com/u/36850920?v=4)](https://github.com/mabruchet "mabruchet (2 commits)")[![leanormandon](https://avatars.githubusercontent.com/u/30038624?v=4)](https://github.com/leanormandon "leanormandon (2 commits)")[![robinallezard](https://avatars.githubusercontent.com/u/32717550?v=4)](https://github.com/robinallezard "robinallezard (2 commits)")[![zzuutt](https://avatars.githubusercontent.com/u/7439945?v=4)](https://github.com/zzuutt "zzuutt (1 commits)")[![Lucanis](https://avatars.githubusercontent.com/u/6052481?v=4)](https://github.com/Lucanis "Lucanis (1 commits)")[![roadster31](https://avatars.githubusercontent.com/u/2197734?v=4)](https://github.com/roadster31 "roadster31 (1 commits)")[![anoziere](https://avatars.githubusercontent.com/u/118798868?v=4)](https://github.com/anoziere "anoziere (1 commits)")

---

Tags

anti-botanti-spamgoogle-recaptcharecaptchathelia

### Embed Badge

![Health badge](/badges/thelia-re-captcha-module/health.svg)

```
[![Health](https://phpackages.com/badges/thelia-re-captcha-module/health.svg)](https://phpackages.com/packages/thelia-re-captcha-module)
```

###  Alternatives

[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

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