Search by

cripcha / cripcha-bundle

Crispy-Medias

Symfony bundle of Cripcha: form type, validation constraint and Twig helper for the privacy-first, cookie-free captcha

Package info

github.com/cripcha/cripcha-bundle

Homepage

Documentation

Type:symfony-bundle

pkg:composer/cripcha/cripcha-bundle

Statistics

Installs: 9

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.4 2026-11-27 23:28 UTC

This package is auto-updated.

Last update: 2026-11-27 23:30:46 UTC


README

Cripcha for Symfony 6.4, 7 and 8: a form type, a validation constraint and a Twig function.

composer require cripcha/cripcha-bundle

(Or offline: download cripcha-php.zip and cripcha-bundle.zip from cripcha.crispy-medias.fr into artifacts/, then composer config repositories.cripcha artifact ./artifacts before the require.)

Then register the bundle in config/bundles.php if Flex did not: Cripcha\Bundle\CripchaBundle::class => ['all' => true].

The keys come from the environment, no configuration file needed:

# .env.local
CRIPCHA_SITE_KEY=ck_…
CRIPCHA_SECRET=cs_…

Optional config/packages/cripcha.yaml (other keys, api_url, widget_url, timeout):

when@test:
    cripcha:
        enabled: false        # every token accepted in the tests of the application

Form component:

$builder->add('cripcha', CripchaType::class);   // shows the widget, checks the token

Without the Form component (a DTO bound with #[MapRequestPayload], a hand-written form):

#[Cripcha]                     // reads the field cripcha-response of the request
public string $email;
<form method="post">… {{ cripcha_widget() }} <button>Send</button></form>
{{ cripcha_widget({form: '#login'}) }}   {# outside of the form #}

The error message is translated (fr, en, es, de, nl, it, pt, uk, ro, ru; domain validators; in English without the Translation component).