PHPackages                             artack/recaptcha-enterprise-bundle - 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. artack/recaptcha-enterprise-bundle

ActiveSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

artack/recaptcha-enterprise-bundle
==================================

Symfony integration for Google reCAPTCHA Enterprise (Assessments API)

0.2.0(6mo ago)0607MITPHPPHP ^8.2CI passing

Since Oct 3Pushed 6mo agoCompare

[ Source](https://github.com/artack/recaptcha-enterprise-bundle)[ Packagist](https://packagist.org/packages/artack/recaptcha-enterprise-bundle)[ RSS](/packages/artack-recaptcha-enterprise-bundle/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (6)Versions (5)Used By (0)

artack/recaptcha-enterprise-bundle
==================================

[](#artackrecaptcha-enterprise-bundle)

> Symfony integration for Google reCAPTCHA Enterprise (Assessments API).

[![Latest Release](https://camo.githubusercontent.com/c5cdec797724cc4571d11ed9d892a82d8a66bef28b023456062f249b3277a874/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61727461636b2f7265636170746368612d656e74657270726973652d62756e646c652e737667)](https://packagist.org/packages/artack/recaptcha-enterprise-bundle)[![MIT License](https://camo.githubusercontent.com/42d3f07bbbcedb114d57a820a85e313e7491164f03ef14186cf947d57b8389b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f61727461636b2f7265636170746368612d656e74657270726973652d62756e646c652e737667)](http://opensource.org/licenses/MIT)[![Total Downloads](https://camo.githubusercontent.com/ac54fc49c3e58d9aaa16894766f9583f7409df50c2dabf3a41f0667aaeb48523/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61727461636b2f7265636170746368612d656e74657270726973652d62756e646c652e737667)](https://packagist.org/packages/artack/recaptcha-enterprise-bundle)

Developed by [ARTACK WebLab GmbH](https://www.artack.ch) in Zurich, Switzerland.

Features
--------

[](#features)

- Provides the **RecaptchaEnterpriseType** form type that renders the hidden token field, loads the Google script and submits the token transparently.
- Ships a **RecaptchaEnterprise** validation constraint for attributes and PHP configuration, including configurable score threshold and action names.
- Automatically resolves client IP and User-Agent from Symfony's request stack and forwards them to Google when available.
- Registers the form theme automatically, so no manual Twig configuration is required.

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

[](#installation)

Install the bundle via [Composer](https://getcomposer.org):

```
$ composer require artack/recaptcha-enterprise-bundle
```

The bundle is auto-registered thanks to Symfony Flex support.

> ⚠️ This bundle is being used in production, but hasn't reached version 1.0 yet. Therefore, there can be breaking changes between minor versions. I'd recommend that you require the bundle only with the current minor version like `composer require artack/recapture-bundle:0.1.*`

Configuration
-------------

[](#configuration)

Create `config/packages/artack_recaptcha_enterprise.yaml` with your Google project credentials:

```
# config/packages/artack_recaptcha_enterprise.yaml
artack_recaptcha_enterprise:
    enabled: '%env(resolve:ARTACK_GOOGLE_RECAPTCHA_ENABLED)%' # defaults to true
    site_key: '%env(resolve:ARTACK_GOOGLE_RECAPTCHA_SITE_KEY)%'
    project_id: '%env(resolve:ARTACK_GOOGLE_RECAPTCHA_PROJECT_ID)%'
    api_key: '%env(resolve:ARTACK_GOOGLE_RECAPTCHA_API_KEY)%'
    min_score: 0.5 # default score threshold used by the validator when none is provided

when@dev:
    artack_recaptcha_enterprise:
        enabled: false # disable reCAPTCHA in dev environments
```

All keys are required. `min_score` defaults to `0.5` and is used when a constraint does not define its own threshold.

Usage
-----

[](#usage)

Render the token field in a Symfony form:

```
use Artack\RecaptchaEnterpriseBundle\Form\RecaptchaEnterpriseType;
use Artack\RecaptchaEnterpriseBundle\Validator\RecaptchaEnterprise;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\FormBuilderInterface;

final class ContactType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options): void
    {
        $builder
            ->add('email', EmailType::class)
            ->add('message', TextareaType::class)
            ->add('recaptchaToken', RecaptchaEnterpriseType::class, [
                'action_name' => 'contact',  # sent to Google; also matched when validating
                'script_csp_nonce' => '...' # optional generated nonce to be used in the script tag
                'constraints' => [
                    new RecaptchaEnterprise(
                        minScore: 0.7, # optional
                        actionName: 'contact',
                    ),
                ],
            ]);
    }
}
```

The provided Twig theme is prepended automatically. When the form submits, the bundle executes `grecaptcha.enterprise.execute`, fills the hidden field and re-submits the form.

License
-------

[](#license)

This bundle is released under the [MIT License](LICENSE).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance66

Regular maintenance activity

Popularity17

Limited adoption so far

Community6

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

Every ~20 days

Total

4

Last Release

204d ago

PHP version history (2 changes)0.1.1PHP ^8.4

0.1.2PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a960d5235efdb31dc5e6266966529a26f2ee271978555895a7a7119a74455b7?d=identicon)[scube](/maintainers/scube)

---

Top Contributors

[![plandolt](https://avatars.githubusercontent.com/u/922919?v=4)](https://github.com/plandolt "plandolt (19 commits)")

---

Tags

googlephprecaptcharecaptcha-sloversymfonysymfony-bundle

### Embed Badge

![Health badge](/badges/artack-recaptcha-enterprise-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/artack-recaptcha-enterprise-bundle/health.svg)](https://phpackages.com/packages/artack-recaptcha-enterprise-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M373](/packages/easycorp-easyadmin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

51090.8k2](/packages/web-auth-webauthn-framework)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1155.2k](/packages/rcsofttech-audit-trail-bundle)[kimai/kimai

Kimai - Time Tracking

4.7k8.7k1](/packages/kimai-kimai)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k16.8k](/packages/prestashop-prestashop)

PHPackages © 2026

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