pawsitiwe/sulu-turnstile-bundle

Cloudflare Turnstile integration for Sulu FormBundle (fully automatic).

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:symfony-bundle

pkg:composer/pawsitiwe/sulu-turnstile-bundle

0.0.5 2025-12-03 06:44 UTC

This package is auto-updated.

Last update: 2025-12-03 06:46:12 UTC


README

Cloudflare Turnstile integration for Sulu FormBundle (fully automatic).

This bundle is a wrapper for the Pixel-Open Cloudflare Turnstile Bundle and allows you to easily add Turnstile captchas as Dynamic FormFields in Sulu without manually configuring services or XML.

Features

  • Adds a Turnstile Dynamic FormFieldType automatically.
  • Fully compatible with Sulu 2.x.
  • No manual project modifications required.
  • Installable via composer require.
  • Field appears automatically in the Sulu Admin.

Installation

1. Install the bundle via Composer

composer require pawsitiwe/sulu-turnstile-bundle

2. Register the bundle

If Symfony Flex is enabled, it should register automatically in config/bundles.php:

return [
    // ...
    PixelOpen\CloudflareTurnstileBundle\PixelOpenCloudflareTurnstileBundle::class => ['all' => true],
    Pawsitiwe\SuluTurnstileBundle\PawsitiweSuluTurnstileBundle::class => ['all' => true],
];

3. Add configuration

Add a config file into config/packages/pixel_open_cloudflare_turnstile.yaml :

pixel_open_cloudflare_turnstile:
    key: '%env(TURNSTILE_KEY)%'
    secret: '%env(TURNSTILE_SECRET)%'
    enable : true

4. Add Cloudflare API credentials to your environment variables

Visit Cloudflare to create your site key and secret key and add them to your .env file.

TURNSTILE_KEY="1x00000000000000000000AA"
TURNSTILE_SECRET="2x0000000000000000000000000000000AA"

5. Clear the cache

bin/console cache:clear

Usage in Sulu Admin

  1. After installation, the Turnstile field is automatically available in the Dynamic FormFieldType dropdown.
  2. The field can be configured like any other Dynamic FormField.

Requirements

Note

This bundle is only a Sulu wrapper for the official Pixel-Open Cloudflare Turnstile Bundle. It handles:

  • Registration as a Dynamic FormFieldType
  • XML field setup
  • Easy usage in the Sulu Admin

The actual Captcha logic remains fully handled by the original bundle.

License

MIT