Skip to content

Expose full Google reCAPTCHA response data via ReCaptchaResponse::get…#76

Merged
f3l1x merged 1 commit intocontributte:masterfrom
radimvaculik:feat/expose-recaptcha-response-data
Mar 1, 2026
Merged

Expose full Google reCAPTCHA response data via ReCaptchaResponse::get…#76
f3l1x merged 1 commit intocontributte:masterfrom
radimvaculik:feat/expose-recaptcha-response-data

Conversation

@radimvaculik
Copy link
Member

…Data()

  • Add getData() method to ReCaptchaResponse returning the raw API response array
  • Add ReCaptchaResponseData shaped array type covering all v2/v3 response fields
  • Add missing error code constants (bad-request, timeout-or-duplicate)
  • Fix missing $answer on failure branch in ReCaptchaProvider::validate()
  • Expand test coverage for getRules(), setMessage(), setMinimalScore(), makeRequest()

Closes #69

@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.62%. Comparing base (f1fdf03) to head (29570e5).
⚠️ Report is 11 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (f1fdf03) and HEAD (29570e5). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (f1fdf03) HEAD (29570e5)
4 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
- Coverage   86.11%   80.62%   -5.49%     
==========================================
  Files           7        8       +1     
  Lines         144      191      +47     
==========================================
+ Hits          124      154      +30     
- Misses         20       37      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…Data()

- Add getData() method to ReCaptchaResponse returning the raw API response array
- Add ReCaptchaResponseData shaped array type covering all v2/v3 response fields
- Add missing error code constants (bad-request, timeout-or-duplicate)
- Fix missing \$answer on failure branch in ReCaptchaProvider::validate()
- Expand test coverage for getRules(), setMessage(), setMinimalScore(), makeRequest()

Closes contributte#69
@radimvaculik radimvaculik force-pushed the feat/expose-recaptcha-response-data branch from 405ff6f to 29570e5 Compare February 28, 2026 16:34
@f3l1x f3l1x merged commit 0b45c5f into contributte:master Mar 1, 2026
10 of 11 checks passed
@radimvaculik radimvaculik deleted the feat/expose-recaptcha-response-data branch March 1, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"score" from validation not available for application

2 participants