Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Hcaptcha Bundle Laravel Package

meteo-concept/hcaptcha-bundle

Symfony bundle that adds hCaptcha protection to your forms with minimal setup. Includes a dedicated form type and server-side validation to block bots and spam, with simple configuration for Symfony applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — poor for direct use, good as a reference implementation. Unchanged by v4.5.0. This package is a Symfony bundle, not a Laravel package. Its value is delivered through Symfony's DependencyInjection, HttpKernel, Config, and Form components — service definitions in YAML/XML, form type extensions, and event subscribers. Laravel has none of these integration points: it uses its own container, its own validation pipeline, Blade, and Guzzle. The only genuine overlap is the underlying hCaptcha server-side verification call, which is a single outbound HTTPS POST to api.hcaptcha.com/siteverify with secret, response, sitekey, and optionally remoteip. That logic is small enough to reimplement in a Laravel service provider in a day. The bundle itself should not be installed in a Laravel application.

v4.5.0 is a version-support release and does not change this conclusion. The release adds Symfony 8.0 support, retains Symfony 6.4 and 7.4, and drops explicit testing for intermediate minors (6.0–6.3, 7.0–7.3). There are no new features, no new verification parameters, no changes to the hCaptcha contract, and no deprecations affecting behavior. The entire delta is Symfony-version alignment — which is precisely the axis a Laravel team does not care about. If anything, the release confirms the coupling: the maintainer's roadmap is Symfony framework compatibility, not framework-agnostic verification logic.

Integration feasibility. Direct composer require into a Laravel app remains non-viable — it would pull a bundle expecting FrameworkBundle, register services Laravel never boots, and provide no usable form or validation integration. Note that the Symfony 8 leg of v4.5.0 implies PHP 8.4, so the package's tested support matrix is now straddling PHP 8.2–8.4 depending on Symfony version; that matrix is irrelevant to us but is a reminder that any accidental install would drag in transitive constraints. The realistic path is unchanged: a thin Laravel-native port — config file for site key/secret, a ValidationRule object wrapping the siteverify call, a Blade component for the widget script, and a feature flag per form.

Technical risk.

  • License is NOASSERTION — still the highest-severity finding and not addressed by this release. Without a clear OSI license, copying code is a legal exposure and using it as a dependency is an audit finding. Resolve before any code reuse. v4.5.0 changes nothing here; do not let a routine version bump reset the clock on this gate.
  • Maintenance signal: improved, marginally. Shipping Symfony 8 support within the framework's release window is evidence of an active, responsive single maintainer rather than an abandoned artifact. This softens the earlier "assume abandoned" posture toward "small but currently alive." It does not change the planning assumption of zero upstream support obligations to us.
  • Community signal remains thin: ~23 stars, 0 dependents, single-vendor (Meteo-Concept) maintenance. Zero dependents means no ecosystem has battle-tested it. A version-support release adds no consumers.
  • Security-sensitive surface: bot mitigation is an abuse-control boundary. Bugs here are silent (all-pass or all-fail) and directly affect signup, login, and checkout funnels. No security content in this release.
  • Composite score 6.39 with opportunity 43.32 remains consistent with "usable niche utility, weak adoption."

Key questions for the maintainer / code audit.

  1. What is the actual license, and is code reuse permitted? (Blocking; unanswered through v4.5.0.)
  2. Which hCaptcha modes are supported — passive/invisible, Enterprise (score thresholds, rqdata, custom difficulty), or checkbox only? (No change in v4.5.0.)
  3. Are remoteip and sitekey sent on verification, and is the returned hostname/credit validated or discarded? (No change.)
  4. How are hCaptcha's error-codes (e.g. invalid-input-response, timeout-or-duplicate) surfaced to the form layer, and are tokens treated as strictly single-use? (No change.)
  5. What is the failure policy on network error — fail-open or fail-closed — and is it configurable? (No change.)
  6. Symfony/PHP version constraints on the latest release, and whether symfony/http-client is mandatory. Partially answered by v4.5.0: Symfony 6.4 / 7.4 / 8.0 supported; intermediate minors 6.0–6.3 and 7.0–7.3 no longer explicitly tested; Symfony 8 implies PHP 8.4. symfony/http-client dependency status still needs confirmation from composer.json.

Integration Approach

Stack fit. Target Laravel 10/11/12 on PHP 8.2+ with Guzzle (framework default) rather than adding symfony/http-client. The v4.5.0 Symfony 8 leg reinforces that the bundle's HTTP layer will track Symfony's client, not Laravel's — another reason not to depend on it. Reimplement as an internal package: HCaptchaService (verification), HCaptchaRule (validation), HCaptcha Blade component (widget + script), config publishable to config/hcaptcha.php, keys sourced from environment/secret manager. Expose the raw verification result so calling code can log error-codes and score when Enterprise is enabled.

Migration path. If a Symfony service using this bundle is being consolidated into a Laravel estate, do not port the bundle — port the behavior. Build a parity matrix covering: config keys and defaults, field naming convention, verification request parameters, error message strings, timeout value, and failure policy. That matrix is the acceptance test for the Laravel implementation. Pin the parity capture to v4.5.0 and record the version in the matrix header, since the maintainer has now demonstrated willingness to move framework baselines.

Compatibility. Three seams, all unchanged by v4.5.0: (1) HTTP client — the bundle uses Symfony HttpClient; Laravel's Http facade is Guzzle-backed, so response handling and timeout semantics differ; (2) front-end asset delivery — a Symfony bundle ships Twig/Encore/AssetMapper integration, which must be replaced with a Blade partial or a Vite-imported JS module; (3) localization — Symfony translator strings need Laravel lang files. The dropped testing for Symfony 6.0–6.3 and 7.0–7.3 is not relevant to us (we run neither), but it is a useful signal that the maintainer prunes support aggressively — do not assume a long tail of patch releases for any version you might reference.

Sequencing. Unchanged.

  1. License and code audit — blocking gate. v4.5.0 does not clear it.
  2. Prototype the Laravel rule + service against hCaptcha's documented test keys in a staging app.
  3. Run the Symfony bundle in a throwaway test app (Symfony 6.4 or 7.4 is the lowest-friction version for this, not 8.0) and capture its behavior into the parity matrix.
  4. Package internally, with unit tests for timeout, duplicate-token, and invalid-secret paths.
  5. Roll out form-by-form behind a per-form config flag; start with the lowest-risk form (newsletter) before login/registration/checkout.

Operational Impact

Maintenance. You will still own this code. The v4.5.0 release is a mild positive on vendor health — it shows the maintainer responds to framework releases — so the planning assumption moves from "likely abandoned" to "small, active, single-maintainer, with no obligation to us." Practically: pin v4.5.0 as the audited reference, vendor the verification logic into your own namespace, and stop tracking upstream after parity is achieved. Continue watching hCaptcha's API changelog, not the bundle's, as the primary dependency signal. If you retain any read-only tracking of upstream, note that its release cadence is now driven by Symfony majors (roughly annual), so silence between releases is expected and not evidence of abandonment.

Support. No commercial support path. The operative knowledge base is hCaptcha's own documentation plus your internal runbook. That runbook must cover: secret rotation without downtime, the fail-open/fail-closed decision and who can change it, how to verify the integration is live (a canary form submission with a known-bad token), and how to read error-codes in logs. Nothing in v4.5.0 adds or removes runbook surface.

Scaling. Every protected submission gains a synchronous external HTTP call — budget 100–300 ms p95 in the request path, more from regions far from hCaptcha's edge. This is a hard runtime dependency on a third party at your most conversion-sensitive funnel step. Set explicit connect/read timeouts (2s/3s), and note that retries are unsafe on the same token — hCaptcha tokens are single-use, so a retried verification will return timeout-or-duplicate even if the first call succeeded. Do not wrap this call in an automatic retry.

Failure modes.

  • hCaptcha outage → either blocked submissions (fail-closed) or an open spam window (fail-open). This is a product decision, not an engineering default; make it per-form (fail-open on newsletter, fail-closed on account creation).
  • Misconfigured or rotated secret → every submission fails silently while the widget still renders successfully. Alert on the verification failure rate, not just on HTTP errors.
  • Token expiry between render and submit → user-facing dead end on slow forms; needs a client-side reset handler.
  • Passive/invisible mode false positives → legitimate users silently blocked with no visible challenge. Instrument rejection rates by cohort before enabling broadly.
  • No circuit breaker → a hCaptcha slowdown becomes a full application slowdown via exhausted PHP-FPM workers. Cap concurrency or short-circuit after N consecutive failures.
  • Newly relevant to this release: because the maintainer drops explicit testing for intermediate Symfony minors, any team that does consume the bundle inherits a narrower tested matrix than the version constraint implies. Not a risk for the Laravel path, but a talking point if a Symfony service in the estate also uses it — that team should pin and verify independently of this assessment.

Ramp-up. Low technical ramp: a mid-level Laravel engineer can deliver the port in 1–2 days, and there is no bundle to learn. The real ramp remains organizational — legal sign-off on the license, a documented abuse-response policy, and on-call familiarity with a new external dependency in the auth path. Budget the majority of effort there, not in code. v4.5.0 does not reduce that effort.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core