PHPackages                             jield-webdev/laminas-recaptcha - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. jield-webdev/laminas-recaptcha

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

jield-webdev/laminas-recaptcha
==============================

Laminas module that lets you easily incorporate Google's new, simpler recaptcha (I am not a robot)

v2.0(3y ago)012.7k↓50%[1 PRs](https://github.com/jield-webdev/laminas-recaptcha/pulls)MITPHPPHP ^8.0 || 8.1

Since Dec 4Pushed 2mo agoCompare

[ Source](https://github.com/jield-webdev/laminas-recaptcha)[ Packagist](https://packagist.org/packages/jield-webdev/laminas-recaptcha)[ Docs](https://github.com/jield-webdev/laminas-recaptcha)[ RSS](/packages/jield-webdev-laminas-recaptcha/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (7)Used By (0)

CirclicalRecaptcha
------------------

[](#circlicalrecaptcha)

This repo is a fork of  and upgraded to support Laminas This library only supports Google ReCaptcha v3, for support of Google ReCaptcha v2 please use the [Main repo](https://github.com/Saeven/zf2-circlical-recaptcha)

Implementation
--------------

[](#implementation)

The system uses `form_elements` factories so the captcha form element cannot be directly called in the form constructor, but have to be called via an `init()` call

Here is an example of a registration form using captcha form element

Install the module via composer:

```
composer require jield-webdev/laminas-recaptcha
```

And modify `circlical.recaptcha.local.php` and change the values with the values which can be found on the [ReCaptcha dashboard](https://www.google.com/recaptcha/about/). Make sure you register a v3 application

```
setAttribute('action', '');

        $this->add(
            [
                'name' => 'firstName',
                'type' => Text::class,
                'options' => [
                    'label' => _('txt-first-name'),
                ],
                'attributes' => [
                    'placeholder' => _('txt-give-your-first-name'),
                ],
            ]
        );
        $this->add(
            [
                'name' => 'lastName',
                'type' => Text::class,
                'options' => [
                    'label' => _('txt-last-name'),
                ],
                'attributes' => [
                    'placeholder' => _('txt-give-your-last-name'),
                ],
            ]
        );
        $this->add(
            [
                'name' => 'email',
                'type' => Email::class,
                'options' => [
                    'label' => _('txt-company-email-address'),
                ],
                'attributes' => [
                    'placeholder' => _('txt-give-your-company-email-address'),
                ],
            ]
        );
        $this->add(
            [
                'name' => 'g-recaptcha-response',
                'type' => Recaptcha::class,
            ]
        );
        $this->add(
            [
                'name' => 'csrf',
                'type' => Csrf::class,
            ]
        );
        $this->add(
            [
                'name' => 'submit',
                'type' => 'submit',
                'attributes' => [
                    'class' => 'btn btn-primary',
                    'value' => _('txt-register'),
                ],
            ]
        );
    }
}
```

Register the form in the `module.config.php`, use a ConfigAbstractFactory pattern to register more services in the form or use an invokable when no dependencies are needed

```
'form_elements' => [
    'factories' => [
        Register::class => ConfigAbstractFactory::class,
    ],
],
```

The form has to be injected in the `Controller` via the `FormElementManager`, when using the `ConfigAbstractFactory`system this can be done as follows:

```
UserController::class => [
   'FormElementManager'
],
```

In the controller the form can be called in the following way

```
//To properly load the captcha, we need to use the formElementManager to get the form
$form = $this->formElementManager->get(Register::class);
```

```
docker compose run --rm php vendor/bin/phpstan --memory-limit=2G
```

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance57

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 81.1% 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 ~1209 days

Total

3

Last Release

1400d ago

Major Versions

0.9 → 1.02016-10-08

1.0 → v2.02022-07-18

PHP version history (2 changes)0.9PHP &gt;=5.5

v2.0PHP ^8.0 || 8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e015020fd0b3c5bb51b7d9c09205fa556a424a8d5345030a77fbafcbf05385c?d=identicon)[japaveh](/maintainers/japaveh)

---

Top Contributors

[![Saeven](https://avatars.githubusercontent.com/u/887224?v=4)](https://github.com/Saeven "Saeven (30 commits)")[![japaveh](https://avatars.githubusercontent.com/u/1028237?v=4)](https://github.com/japaveh "japaveh (7 commits)")

---

Tags

laminasgooglerecaptchacaptchaform

###  Code Quality

Static AnalysisRector

### Embed Badge

![Health badge](/badges/jield-webdev-laminas-recaptcha/health.svg)

```
[![Health](https://phpackages.com/badges/jield-webdev-laminas-recaptcha/health.svg)](https://phpackages.com/packages/jield-webdev-laminas-recaptcha)
```

###  Alternatives

[arcanedev/no-captcha

No CAPTCHA (new Google reCAPTCHA) with Laravel support

370730.4k6](/packages/arcanedev-no-captcha)[contributte/recaptcha

Google reCAPTCHA for Nette - Forms

421.3M4](/packages/contributte-recaptcha)[crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP projects

20112.2k1](/packages/crabstudio-recaptcha)

PHPackages © 2026

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