PHPackages                             petrabarus/yii2-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. petrabarus/yii2-recaptcha

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

petrabarus/yii2-recaptcha
=========================

Yii2 widget for reCaptcha

012.0kPHP

Since Jun 13Pushed 10y ago1 watchersCompare

[ Source](https://github.com/petrabarus/yii2-recaptcha)[ Packagist](https://packagist.org/packages/petrabarus/yii2-recaptcha)[ RSS](/packages/petrabarus-yii2-recaptcha/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 ReCaptcha
==============

[](#yii2-recaptcha)

Google reCaptcha widget for Yii2.

[![Latest Stable Version](https://camo.githubusercontent.com/9df61b7afd0be3d4d9ee77a7c08c553dc9e5843ba0b212d77e768f3de4a03112/68747470733a2f2f706f7365722e707567782e6f72672f706574726162617275732f796969322d7265636170746368612f762f737461626c652e737667)](https://packagist.org/packages/petrabarus/yii2-recaptcha)[![Total Downloads](https://camo.githubusercontent.com/bee42b5a5ea9ebc1490f4866601a71a0efa5c19ee72a587f481deb270f0fa2ba/68747470733a2f2f706f7365722e707567782e6f72672f706574726162617275732f796969322d7265636170746368612f646f776e6c6f6164732e737667)](https://packagist.org/packages/petrabarus/yii2-recaptcha)[![Latest Unstable Version](https://camo.githubusercontent.com/aec4625bbe4b9d1b0892e9798b4256c6287deceb3a1502acd831687af7ca7a5b/68747470733a2f2f706f7365722e707567782e6f72672f706574726162617275732f796969322d7265636170746368612f762f756e737461626c652e737667)](https://packagist.org/packages/petrabarus/yii2-recaptcha)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist petrabarus/yii2-recaptcha "*"

```

or add

```
"petrabarus/yii2-recaptcha": "*"

```

to the require section of your `composer.json` file.

Requirement
-----------

[](#requirement)

This package require

- Latest Yii2
- PHP 5.4 or later

Usage
-----

[](#usage)

Obtain the credentials in [Google reCaptch](https://www.google.com/recaptcha). After that dd configuration in the params.

```
[
    'reCaptcha' => [
        'siteKey' => 'ABCDEFGHIJKLMN',
        'secretKey' => 'ABCDEFGHIJKLMN',
    ]
]

```

Make sure the configuration can be accessed via `Yii::$app->params['reCaptcha']['siteKey']`and `Yii::$app->params['reCaptcha']['secretKey']`.

To use in the active form.

```
$form->field($model, 'captcha')->widget(\PetraBarus\Yii2\ReCaptcha\ReCaptcha::class);

```

To add validator in the rules

```
['captcha', \PetraBarus\Yii2\ReCaptcha\ReCaptchaValidator::class],

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c1261f29f95a5ca228a04c8415431baf0fb6c397ec83e93e3454fb0b55718c5e?d=identicon)[petrabarus](/maintainers/petrabarus)

---

Top Contributors

[![petrabarus](https://avatars.githubusercontent.com/u/523289?v=4)](https://github.com/petrabarus "petrabarus (5 commits)")

### Embed Badge

![Health badge](/badges/petrabarus-yii2-recaptcha/health.svg)

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

###  Alternatives

[hollodotme/crontab-validator

A validator for crontab expressions.

10250.9k2](/packages/hollodotme-crontab-validator)

PHPackages © 2026

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