darkghosthunter/captchavel
Captchavel gives Laravel a single, unified API for reCAPTCHA, hCaptcha, and other CAPTCHA providers. It includes validation rules, Blade directives, middleware, and fakeable testing helpers, so you can protect forms without vendor lock-in.
Architecture fit: Captchavel is a thin Laravel wrapper around Google reCAPTCHA (v2 checkbox/invisible and v3 score-based), exposing Blade directives, validation rules (captcha), and a facade for server-side verification. The architectural fit is good for Laravel applications that already use the framework's validation and Blade layers: it adds no service boundary, no queue worker, and no additional datastore. The critical architectural caveat, however, is the direction of the dependency — every protected form now has a synchronous outbound HTTPS call to Google's siteverify endpoint inline in the request lifecycle.
Integration feasibility: Very high from a pure mechanics standpoint: composer require, publish config, set site/secret keys, drop @captcha into a form, add the validation rule to the controller. Integration effort is measured in hours, not sprints. The real feasibility question is not mechanical but strategic — the release notes for v7.0.3 state the package is superseded by Laragear/ReCaptcha, described as functionally similar with additional features and performance optimizations. That reframes this as "should we adopt an upstream-acknowledged end-of-life package," not "can we integrate it."
Technical risk: Elevated, and driven almost entirely by lifecycle status rather than code quality.
siteverify being reachable and within latency budget; there is no local fallback, and a timeout typically surfaces as a validation failure to the end user.Note that the release notes contain no security fix, no breaking API change, and no feature content for v7.0.3 — the version is a redirect notice. There is no "upgrade to v7.0.3 to get X" argument here.
Key questions:
Laragear/ReCaptcha? Default answer should be no unless a specific blocker exists.Laragear/ReCaptcha support that matrix (including any LTS versions still in flight)?Stack fit: Designed for Laravel's native idioms — service provider auto-discovery, config publishing, Blade components, and Validator extension. It assumes a conventional Laravel request/response flow with server-rendered forms. Applications using SPA front ends, separate mobile clients, or an API-only architecture get less value, since client-side token generation and injection must be hand-rolled and only the server-side verification helper is reused.
Migration path: Because the successor is described as "very similar," expect a shallow migration: swap the Composer requirement, republish the config file, rename the facade/validation rule/Blade directive references, and re-point the environment variables. The realistic effort is 1–3 developer-days for a typical application, dominated by regression testing on every protected form rather than by code changes. The recommended sequencing is:
composer.json in a follow-up cleanup PR.If Captchavel is not yet in the codebase: skip directly to the successor and do not onboard the deprecated package at all.
Compatibility: Verify the successor's support matrix against your actual runtime, not the latest release. Pay specific attention to PHP minor versions still supported by your platform team, Laravel LTS versions in use, and any dependency on guzzlehttp/guzzle major versions that might conflict with existing pinned dependencies. Also confirm whether the successor publishes its own config namespace — a collision with an existing config/captcha.php will cause silent misconfiguration.
Sequencing: Treat this as a low-urgency, non-blocking migration unless a Laravel major upgrade is on the near-term roadmap, in which case it becomes blocking and should be pulled forward. Do not schedule the migration during a peak-traffic window: captcha misconfiguration manifests as a hard block on form submission, which is a revenue-affecting failure for lead-gen and checkout flows.
Maintenance: The dominant operational fact is that this package is self-declared end-of-life. There will be no upstream fixes for a future Laravel incompatibility, and no coordinated response to a reCAPTCHA API change or a CVE in a transitive dependency. Budget a recurring line item for "deprecated dependency" in the dependency-review process, and treat any future Laravel major upgrade as requiring the migration first. The ongoing maintenance burden is low while nothing changes and unbounded at the moment something does.
Support: Internal support load is modest and predictable: key misconfiguration, domain allow-list errors, and score-threshold tuning. The support risk is external — the upstream repository should be expected to be unresponsive, so the team's own engineers are the escalation path. Document the integration internally (where keys live, how to rotate them, which forms are protected) before the maintainer archives the repo, because that documentation will not come from upstream.
Scaling: Two dimensions matter. Volume: verification is one outbound HTTPS request per form submission, adding roughly 100–400ms of latency to each protected request and consuming synchronous PHP-FPM workers for the duration. At high submission volume this becomes a worker-saturation consideration — if captcha-protected endpoints are a meaningful share of traffic, plan capacity accordingly or ensure guzzle timeouts and connection reuse are tuned. Geographic and provider-side scaling are outside your control: Google rate-limits and availability are opaque, and there is no local caching strategy for a token that is single-use by design. Note also that the successor's advertised "performance optimizations" are a genuine scaling argument for migrating rather than staying.
Failure modes:
| Failure | User-visible effect | Mitigation |
|---|---|---|
Google siteverify unreachable / timeout |
Form submission rejected; user perceives a broken page | Explicit short timeout, fail-open with server-side logging and rate-limit backstops, alerting on error rate |
| Invalid or expired token (stale page, slow fill) | Validation error on submit | Clear error copy; consider token refresh on form interaction |
| Secret key rotated or wrong environment | 100% of protected submissions fail | Config validation at boot; canary check in staging; alert on sudden drop in successful submissions |
| Domain mismatch in reCAPTCHA console | Client widget fails to render → no token → server rejects | Pre-deploy checklist item; smoke test in staging with production keys |
| v3 score threshold too aggressive | Silent, recurring rejection of legitimate users (often indistinguishable from a bad password) | Start permissive, tune from score telemetry, monitor conversion rate not just error rate |
| Dependency conflict on Laravel upgrade | Fatal error at boot | Blocked by migration completion; sequencing item above |
| Package abandoned with no successor migration | Compounding risk across every future upgrade | Complete the migration to the successor |
The v3 silent-rejection mode deserves emphasis: it is the failure mode most likely to go unnoticed because it produces a generic validation message rather than an infrastructure alert. Instrument the conversion rate on protected forms, not just HTTP error rates.
Ramp-up: Developer ramp-up is minimal — a single engineer can be productive in under a day given the package's narrow, conventional API. The steeper ramp is organizational: privacy review, key custody and rotation ownership, and the migration decision itself. Plan for roughly one sprint of elapsed time end-to-end for a migration, of which only a few days are engineering effort; the remainder is review and regression testing across the form inventory.
How can I help you explore Laravel packages today?