Download the PHP package geekybones/fraud-defense-bundle without Composer
On this page you can find all versions of the php package geekybones/fraud-defense-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download geekybones/fraud-defense-bundle
More information about geekybones/fraud-defense-bundle
Files in geekybones/fraud-defense-bundle
Package fraud-defense-bundle
Short Description Symfony bundle for Google reCAPTCHA Enterprise (forms, validation, score and checkbox widgets)
License MIT
Informations about the package fraud-defense-bundle
Fraud Defense Bundle
Symfony integration for Google reCAPTCHA Enterprise with support for standard bot protection, Transaction Defense, and SMS toll-fraud Defense. By GeekyBones.
| Package | geekybones/fraud-defense-bundle |
| PHP | ^8.2 |
| Symfony | ^7.0 or ^8.0 |
| License | MIT |
Installation
If Symfony Flex did not register the bundle automatically, add it to config/bundles.php:
Google Cloud setup
- Enable the reCAPTCHA Enterprise API in your GCP project.
- Create one or more site keys for your domain (score key for invisible checks, checkbox key for the "I'm not a robot" widget).
- Create an API key restricted to the reCAPTCHA Enterprise API.
For Transaction Defense and SMS Defense, additional console steps are required — see their dedicated guides.
Configuration
Add environment variables:
Create config/packages/fraud_defense.yaml:
Standard reCAPTCHA (RecaptchaType) works with this minimal config. Enable transaction_defense or sms_defense only when you need those flows.
See configuration.md for all options.
Usage
Standard form protection
Validation runs automatically on form submit. No controller changes needed.
Programmatic
Inject the interface and call assess() directly — useful in APIs and controllers without forms:
Form types
| Form type | When to use | Requires |
|---|---|---|
RecaptchaType |
Login, registration, contact — bot detection | Default config |
TransactionRecaptchaType |
Checkout, payment — fraud risk scoring | transaction_defense.enabled: true |
SmsRecaptchaType |
SMS OTP — toll-fraud detection | sms_defense.enabled: true |
All three share the same Twig widget ({{ form_row(form.captcha) }}).
Documentation
| Guide | Contents |
|---|---|
| configuration.md | All YAML options, environment variables, per-case examples |
| recaptcha.md | Standard reCAPTCHA: form setup, script loading, programmatic usage |
| transaction-defense.md | Transaction Defense: GCP setup, form, context reference, troubleshooting |
| sms-defense.md | SMS Defense: GCP setup, form, programmatic usage |
| architecture.md | Internal code structure and request flow |
All versions of fraud-defense-bundle with dependencies
google/cloud-recaptcha-enterprise Version ^2.0
psr/log Version ^3.0
symfony/config Version ^7.0|^8.0
symfony/dependency-injection Version ^7.0|^8.0
symfony/form Version ^7.0|^8.0
symfony/http-foundation Version ^7.0|^8.0
symfony/http-kernel Version ^7.0|^8.0
twig/twig Version ^3.0