Integrations / Symfony
captchacore/captchacore-bundle for Symfony 6.4 LTS and 7.x — FormType, validator constraint, controller attribute and Twig function. You choose what fits your project.
In three steps
composer require — Symfony Flex registers the bundle and creates the configuration file.
CAPTCHACORE_URL, site key and secret as environment variables.
FormType for Symfony forms, constraint for DTOs, attribute for controllers, Twig function for everything else.
composer require captchacore/captchacore-bundle
# .env
CAPTCHACORE_SITE_KEY=cc_pub_…
CAPTCHACORE_SECRET_KEY=cc_sec_…
// FormType
$builder->add('captcha', CaptchaCoreType::class, [
'form_type' => 'contact',
]);
// oder als Attribut am Controller
#[RequiresCaptcha(formType: 'register')]
public function register(Request $request): ResponseWhat you get
One field in the form builder renders widget and token; verification happens in handleRequest().
For DTOs and API payloads: #[CaptchaCoreToken] on the property, checked like any other constraint.
#[RequiresCaptcha] verifies the token before the action runs — no code in the method.
captchacore_widget() for hand-built forms outside the Form component.
Optional “protected by CaptchaCore” notice with a link to the privacy policy.
The client is a service — replace it with a fake in tests, done.
Proof of work and behavioural analysis instead of traffic lights and crosswalks — humans click once, bots compute themselves to death.
Processing on our own servers, no transfer to third countries, no cross-site tracking.
The widget loads fast, never blocks the interface and works with keyboard and screen readers.
No, but it saves registering the bundle manually and writing the configuration file.
Yes, via the validator constraint on your input DTOs.
PHP 8.2 or newer, matching Symfony 6.4 LTS and 7.x.
All details, options and code examples: Documentation →
More integrations