CAPTCHA bundle for Symfony
captchacore/captchacore-bundle for Symfony 6.4 LTS, 7.x and 8.x — FormType, validator constraint, controller attribute and Twig function. You choose what fits your project.
In three steps
Protect Symfony in a few minutes
Install the bundle
Add the repository, run composer require, register the bundle in config/bundles.php and create config/packages/captchacore.yaml.
Keys into .env
CAPTCHACORE_URL, site key and secret as environment variables.
Choose the integration path
FormType for Symfony forms, constraint for DTOs, attribute for controllers, Twig function for everything else.
What you get
Built for Symfony, not just compatible
FormType
One field in the form builder renders widget and token; verification happens in handleRequest().
Validator constraint
For DTOs and API payloads: #[CaptchaCoreToken] on the property, checked like any other constraint.
Controller attribute
#[RequiresCaptcha] verifies the token before the action runs — no code in the method.
Twig function
captchacore_widget() for hand-built forms outside the Form component.
Security badge
For the Symfony login: the badge on the passport has the token checked before the password is.
Tests without network
The client is a service — replace it with a fake in tests, done.
No image puzzles
Proof of work and behavioural analysis instead of traffic lights and crosswalks — humans click once, bots compute themselves to death.
Servers in Germany
Processing on our own servers, no transfer to third countries, no cross-site tracking.
16 KB, no framework
The widget loads fast, never blocks the interface and works with keyboard and screen readers.
Frequently asked questions about Symfony
Do I need Symfony Flex?
No. You register the bundle once in config/bundles.php and keep the configuration in config/packages/captchacore.yaml — with or without Flex.
Does it work with API Platform?
Yes, via the validator constraint on your input DTOs.
Which PHP version?
PHP 8.2 or newer; Symfony 8 itself requires PHP 8.4.
All details, options and code examples: Documentation →
More integrations