Download the PHP package andanteproject/recaptcha-bundle without Composer
On this page you can find all versions of the php package andanteproject/recaptcha-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download andanteproject/recaptcha-bundle
More information about andanteproject/recaptcha-bundle
Files in andanteproject/recaptcha-bundle
Package recaptcha-bundle
Short Description A Symfony Bundle to easily integrate Google reCAPTCHA into Symfony Form
License MIT
Informations about the package recaptcha-bundle
Google ReCAPTCHA Bundle
Symfony Bundle - AndanteProject
A Symfony Bundle to easily integrate Google reCAPTCHA into Symfony Form.
Requirements
Symfony 4.x-6.x and PHP 7.4-8.x.
Install
Via Composer:
Features
- Add Google reCAPTCHA to your Symfony Form just like you do with every other
FormType
; - Works like magic ✨.
Install
After install, make sure you have the bundle registered in your symfony bundles list (config/bundles.php
):
This should have been done automagically if you are using Symfony Flex. Otherwise, just register it by yourself.
Configuration
Create a new andante_re_captcha.yaml
configuration file and sets Google ReCAPTCHA v2 secret
and site_key
.
Dev/test environment Configuration
Please note: If you don't want to be annoyed by recaptcha in your development/test environment, just use secret key
and site key
you can find in this Google ReCAPTCHA documentation page.
Furthermore, you can create a test
configuration to disable Andante\ReCaptchaBundle\Validator\Constraint\ReCaptchaValidator
in test
environment:
Usage
After this, you can add Andante\ReCaptchaBundle\Form\ReCaptchaType
Form type in your forms like you always do with other types.
Done! 🎉
You also have 2 options to change ReCAPTCHA theme or size.
Using the option 'theme'
=> 'dark'
is especially useful if your app has a dark mode.
How to change validation process
Validation is handled by Andante\ReCaptchaBundle\Validator\Constraint\ReCaptchaValidator
, which is a default constraint inside ReCaptchaType
options.
If you want to replace it with your own or disable it for whatever reason, just empty/replace form type constraints
option.
Built with love ❤️ by AndanteProject team.
All versions of recaptcha-bundle with dependencies
symfony/framework-bundle Version ^4.0 | ^5.0 | ^6.0
symfony/form Version ^4.0 | ^5.0 | ^6.0
symfony/validator Version ^4.0 | ^5.0 | ^6.0
google/recaptcha Version ^1.2