- Is beelab/recaptcha2-bundle compatible with Laravel?
- No, it is a Symfony bundle built around Symfony FormType, Validator, Twig, and the Symfony event system, so it does not work in Laravel out of the box. Using it in Laravel requires a custom wrapper that replaces Symfony services with Laravel equivalents. For most Laravel projects a native reCAPTCHA package is a better fit.
- How do I install beelab/recaptcha2-bundle in a Laravel application?
- You can add it with Composer, but installation alone does not integrate it with Laravel because the package expects Symfony bundle registration and services.yaml configuration. You would need to create a Laravel service provider, map configuration into config/recaptcha.php or .env, and replace Twig and Symfony form integration. That wrapper work is significant and not recommended unless you have a specific reason to reuse this Symfony code.
- Can I use beelab/recaptcha2-bundle with Laravel Blade instead of Twig?
- Not directly. The bundle ships Twig-oriented rendering and Symfony form integration, so you cannot reuse its templates in Blade without workarounds. You would need to render the reCAPTCHA widget manually in Blade or create a custom Blade directive and handle validation separately. This is one of the main reasons the bundle is a poor fit for Laravel.
- How do I validate Google reCAPTCHA v2 tokens in Laravel using this bundle?
- The bundle provides a Symfony validation constraint, not a Laravel validation rule, so you cannot use it directly with FormRequest or the Validator facade. You would need to rewrite the constraint as a Laravel custom rule and call the reCAPTCHA siteverify endpoint through Laravel's HTTP client or Guzzle. That rewrite introduces security-sensitive logic you must test carefully.
- Does beelab/recaptcha2-bundle support reCAPTCHA v3?
- No, the bundle is specifically for Google reCAPTCHA v2 and does not provide v3 risk scoring. If your Laravel app needs v3, you must use a different package or implement the v3 siteverify flow yourself. This limits the bundle's use cases for modern bot detection.
- What Laravel version is supported by beelab/recaptcha2-bundle?
- There is no official Laravel version support because the package is a Symfony bundle, not a Laravel package. Its compatibility is with Symfony components and whatever Symfony versions its composer.json allows, not with Laravel's framework versions. Any Laravel compatibility would come from your custom wrapper and would need to be tested against each Laravel release.
- How do I configure beelab/recaptcha2-bundle for Laravel .env and config?
- The bundle expects Symfony YAML configuration, typically in config/packages/beelab_recaptcha2.yaml, rather than Laravel's .env and config files. To use it in Laravel you would map the site key, secret key, and other options into config/recaptcha.php or environment variables and bridge them into the bundle's services. This manual mapping risks misconfiguration and is easy to get wrong.
- How do I test reCAPTCHA v2 in Laravel with beelab/recaptcha2-bundle?
- The bundle includes test-mode logic for CI/CD, but that logic is built for Symfony's testing setup and must be replicated in Laravel's testing framework. You would need to configure a bypass or fake HTTP response in Laravel tests and ensure it never runs in production. If misapplied, test-mode bypass can hide invalid-token failures or allow fake submissions in staging.
- What are alternatives to beelab/recaptcha2-bundle for Laravel?
- For Laravel, native packages such as beberlei/laravel-recaptcha or other Laravel-specific reCAPTCHA integrations are usually better because they provide FormRequest rules, Blade components, and Laravel configuration out of the box. You can also use Google's reCAPTCHA API directly with Laravel's HTTP client and a custom validation rule. A standalone SDK approach gives you control but requires reimplementing validation and error handling.
- Is beelab/recaptcha2-bundle maintained and production-ready for Laravel?
- The bundle is an LGPL-licensed Symfony package with documentation and tests, but its release activity appears low, with the last release noted as May 2026. It is not production-ready for Laravel without a custom wrapper, and future Symfony-side changes could break that wrapper. The maintenance burden and dependency bloat make it a risky choice compared with Laravel-native alternatives.