pixelopen/cloudflare-turnstile-bundle
PixelOpen Cloudflare Turnstile Bundle integrates Cloudflare Turnstile into Symfony forms, offering a privacy-friendly CAPTCHA alternative with simple configuration and server-side token verification to protect submissions from bots and spam.
siteverify. That is a genuinely small build. This package is the artifact that lets you price the buy option honestly: if it saves 1–2 engineer-days per form surface and you have several surfaces, integrate; if you have one form, write it yourself.readonly classes/properties used). That converts "check version constraints" from a footnote into a gating condition: any service still on 8.0/8.1 cannot consume this release at all, and a service on 8.2+ takes an upgrade-cadence dependency. It should show up in the platform-upgrade roadmap, not just the package decision.Adopt when:
readonly classes and constructor property promotion, so 8.2 is a hard floor, not a preference. Confirm the supported Symfony version matrix in composer.json against your runtime before anything else.TurnstileType, so the form-type path is now the better-covered one.enable option. The switch from scalarNode to booleanNode is a small but real backward-compatibility break: string-typed values (enable: "true") that previously validated will now be rejected. If you use %env(bool:…)%, you're fine; if you hand-typed a string, that's your upgrade work item.Configuration, the compiler pass, and the DI extension as final, so a fork is a copy, not a subclass. Plan accordingly.Look elsewhere when:
Http::post to siteverify — roughly the same effort, no third-party maintenance tail.action and cData tokens, custom widget theming/language overrides, explicit handling of the documented error codes, testing keys in CI. New translations are display strings, not full i18n configurability; confirm the rest before you commit.scalarNode to booleanNode plus a runtime floor bump in a single minor release is a reasonable signal to check release cadence against your own upgrade calendar.Practical gate before adoption: read the source end-to-end, confirm the server-side verification is actually performed server-side with the secret (not in Twig), confirm the token is single-use and validated on every protected request, and confirm behavior when Cloudflare is unreachable — fail-open vs fail-closed is a product decision, not an implementation detail, and you should be the one making it. The new TurnstileType tests are a starting point for confidence, not a substitute for that review.
For executives: Cloudflare Turnstile is a free, privacy-friendly bot challenge — it cuts spam signups, credential-stuffing attempts, and fake support tickets without the image puzzles that hurt conversion, and it avoids the third-party-cookie and consent overhead of reCAPTCHA. Integration cost is measured in days, not sprints. The newest release (0.5.0) added German, Italian, and Spanish UI copy and unit tests, which is good housekeeping for an international funnel, but it also raised the PHP floor to 8.2 — so it only applies to services already on our current runtime. The package itself remains a very small open-source project (35 stars, no downstream users, one maintainer), so we should treat it as a fast prototype, not a foundation: run a short spike, measure abuse and conversion impact, and keep the option to swap providers or maintain our own copy. Because it's MIT-licensed and the integration is only a few dozen lines, the worst case is inexpensive — we fork it or replace it in a day.
For engineering: it's a Symfony bundle — DI configuration for site/secret keys, a Twig helper for the widget, and server-side verification against siteverify. 0.5.0 requires PHP 8.2+ (readonly classes/properties, constructor promotion) and tightens the enable option from scalarNode to booleanNode, so a string-typed value that used to pass validation will now fail — check your config before bumping. Configuration, PixelOpenCloudflareTurnstileCompilerPass, and PixelOpenCloudflareTurnstileExtension are now final, so plan any fork as a copy rather than a subclass. Adopt behind our own thin interface (CaptchaVerifier) so the provider and the package are both swappable, pin the version, and add tests for the failure modes the bundle doesn't cover: expired token, reused token, Cloudflare timeout, and missing secret. Given zero dependents, assume we own upgrades.
The ask: a one-to-two day spike on a single low-risk form, on a service already on PHP 8.2+, with a written go/no-go on conversion delta, abuse reduction, and maintenance burden — and a stated fallback (Laravel/Symfony-native integration or in-house verification) agreed before we start.
How can I help you explore Laravel packages today?