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

ActiveSymfony-bundle

vihuvac/recaptcha-bundle
========================

This bundle provides an easy reCAPTCHA form field integration into a Symfony Project

v2.2.0(8y ago)1155.6k8[2 issues](https://github.com/vihuvac/recaptcha-bundle/issues)2MITPHPPHP ^5.3 || ^7.0

Since Jun 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/vihuvac/recaptcha-bundle)[ Packagist](https://packagist.org/packages/vihuvac/recaptcha-bundle)[ Docs](https://github.com/vihuvac/recaptcha-bundle)[ RSS](/packages/vihuvac-recaptcha-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (16)Used By (2)

VihuvacRecaptchaBundle
======================

[](#vihuvacrecaptchabundle)

> ⚠️ **DEPRECATED**:
>
> Unfortunately I want to inform this bundle is getting deprecated, I recommend using [EWZRecaptchaBundle](https://packagist.org/packages/excelwebzone/recaptcha-bundle) instead. Sorry for the inconvenience. 😔

---

This bundle provides easy reCAPTCHA form field for Symfony in order to protect your website from spam and abuse.

[![Latest Stable Version](https://camo.githubusercontent.com/a2a18de8f0f36682eb542b2e79d714fab5e27cb07b41b279cedced26704b0e36/68747470733a2f2f706f7365722e707567782e6f72672f766968757661632f7265636170746368612d62756e646c652f762f737461626c65)](https://packagist.org/packages/vihuvac/recaptcha-bundle) [![Latest Unstable Version](https://camo.githubusercontent.com/832592d626f0463959197da415061b9f408a8fbfbdce25feb564bdd1193fdaac/68747470733a2f2f706f7365722e707567782e6f72672f766968757661632f7265636170746368612d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/vihuvac/recaptcha-bundle) [![Gitter](https://camo.githubusercontent.com/0a49e408f73241890ba46b4c0f0e696e6ada0e701c9fd62a20ba341c7701d9da/68747470733a2f2f6261646765732e6769747465722e696d2f766968757661632f7265636170746368612d62756e646c652e737667)](https://gitter.im/vihuvac/recaptcha-bundle?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![License](https://camo.githubusercontent.com/f572073db68fa97a08b54a0a8e27913e2223edc2489db02cf891d58fb38509f1/68747470733a2f2f706f7365722e707567782e6f72672f766968757661632f7265636170746368612d62756e646c652f6c6963656e7365)](https://packagist.org/packages/vihuvac/recaptcha-bundle)

[![Total Downloads](https://camo.githubusercontent.com/545ddf40d5598f36a17629992177162c946dbd3af885ddc529cfab2128789bcd/68747470733a2f2f706f7365722e707567782e6f72672f766968757661632f7265636170746368612d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/vihuvac/recaptcha-bundle) [![Monthly Downloads](https://camo.githubusercontent.com/8fd44f5cbd6f3ab81b64ed8f6e123953c04aabb525efcfec4978dabc46a952af/68747470733a2f2f706f7365722e707567782e6f72672f766968757661632f7265636170746368612d62756e646c652f642f6d6f6e74686c79)](https://packagist.org/packages/vihuvac/recaptcha-bundle) [![Daily Downloads](https://camo.githubusercontent.com/7c2d42777237701ed146f964f7930099401dae3843e65707791fe0ed535ccf77/68747470733a2f2f706f7365722e707567782e6f72672f766968757661632f7265636170746368612d62756e646c652f642f6461696c79)](https://packagist.org/packages/vihuvac/recaptcha-bundle)

BranchTravisCoverallsmaster[![Build Status](https://camo.githubusercontent.com/511468ff1effb97cb271ae6e3a25afd94fc1e8c395f0be60045742cdaf16e874/68747470733a2f2f7472617669732d63692e6f72672f766968757661632f7265636170746368612d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/vihuvac/recaptcha-bundle)[![Coverage Status](https://camo.githubusercontent.com/cb1f22e24085006c41421e7a92429e47b11e670f05df631558bfcad5b41eebcb/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f766968757661632f7265636170746368612d62756e646c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/vihuvac/recaptcha-bundle?branch=master)Installation
------------

[](#installation)

### Step 1: Using composer and enable the Bundle

[](#step-1-using-composer-and-enable-the-bundle)

To install the bundle via composer, just run from the command line (terminal):

```
$ composer require vihuvac/recaptcha-bundle
```

Composer will automatically download all the required files, and install them for you. All that is left to do is to update your `AppKernel.php` file, and register the new bundle:

```
// app/AppKernel.php

```

**Twig**:

```
{% form_theme form "VihuvacRecaptchaBundle:Form:vihuvac_recaptcha_widget.html.twig" %}

{{
    form_widget(
        form.recaptcha, {
            "attr": {
                "options": {
                    "theme": "light",
                    "type": "audio",
                    "size": "normal"
                },
            }
        }
    )
}}
```

If you are not using a form, you can still implement the reCAPTCHA field using JavaScript:

**PHP**:

```

    $(document).ready(function() {
        $.getScript("", function() {
            Recaptcha.create("", "recaptcha-container", {
                theme: "light",
                type: "audio",
                "size": "normal"
            });
        });
    };

```

**Twig**:

```

    $(document).ready(function() {
        $.getScript("{{ constant('\\Vihuvac\\Bundle\\RecaptchaBundle\\Form\\Type\\VihuvacRecaptchaType::RECAPTCHA_API_JS_SERVER') }}", function() {
            Recaptcha.create("{{ form.recaptcha.get('site_key') }}", "recaptcha-container", {
                theme: "light",
                type: "audio",
                "size": "normal"
            });
        });
    });

```

**Customization**:

If you want to use a custom theme, put your chunk of code before setting the theme:

```

    Incorrect please try again

    Enter the words above:
    Enter the numbers you hear:

    Get another CAPTCHA
    Get an audio CAPTCHA
    Get an image CAPTCHA

    Help

{% form_theme form "VihuvacRecaptchaBundle:Form:vihuvac_recaptcha_widget.html.twig %}

{{
    form_widget(
        form.recaptcha, {
            "attr": {
                "options" : {
                    "theme" : "custom",
                },
            }
        }
    )
}}
```

**Further reading**: [Google Official Doc](https://developers.google.com/recaptcha/ "Getting Started - Google Official Doc").

Tests
-----

[](#tests)

Execute this command to run tests:

```
$ cd recaptcha-bundle/
$ ./vendor/bin/phpunit
```

> **Note**: If you are running tests only and within the bundle, as first step you should run `composer install` in order to install the required dependencies. Then you'll be able to run the tests!

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 95.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 ~94 days

Recently: every ~87 days

Total

15

Last Release

3036d ago

Major Versions

v1.0.1 → v2.0.02015-06-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/45adf1f61e35c9decbdcccbc2cd9ea8b82e3b06a5e7de7e1b4af2118ff86a95e?d=identicon)[vihuvac](/maintainers/vihuvac)

---

Top Contributors

[![vihuvac](https://avatars.githubusercontent.com/u/1273082?v=4)](https://github.com/vihuvac "vihuvac (39 commits)")[![benjaminu](https://avatars.githubusercontent.com/u/1193479?v=4)](https://github.com/benjaminu "benjaminu (1 commits)")[![kazenojiyu](https://avatars.githubusercontent.com/u/3939594?v=4)](https://github.com/kazenojiyu "kazenojiyu (1 commits)")

---

Tags

deprecatedgooglerecaptchaSymfony BundleVihuvac

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[kreait/firebase-bundle

Symfony Bundle for the Firebase Admin SDK

1534.7M2](/packages/kreait-firebase-bundle)[arcanedev/no-captcha

No CAPTCHA (new Google reCAPTCHA) with Laravel support

370730.4k6](/packages/arcanedev-no-captcha)[karser/karser-recaptcha3-bundle

Google ReCAPTCHA v3 for Symfony

1862.4M7](/packages/karser-karser-recaptcha3-bundle)[contributte/recaptcha

Google reCAPTCHA for Nette - Forms

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

A properly coded PHP 5 reCaptcha class that will allow you to interact with Google's reCaptcha API.

48694.0k4](/packages/recaptcha-php5)[phelium/recaptcha

reCAPTCHA v2 class

4389.4k](/packages/phelium-recaptcha)

PHPackages © 2026

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