Skip to content

feat: add Response::hasErrorCode() and expand ARCHITECTURE.md - #645

Merged
rowan-m merged 1 commit into
mainfrom
feat/without-builders-and-has-error-code
Nov 19, 2026
Merged

rowan-m merged 1 commit into
mainfrom
feat/without-builders-and-has-error-code

Conversation

@rowan-m

@rowan-m rowan-m commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Adds backwards-compatible developer ergonomics for 2.2.0:

  • Response::hasErrorCode(string $errorCode): bool:
    • Strict check (in_array($errorCode, $this->errorCodes, true)) for whether a given error code (e.g. ReCaptcha::E_HOSTNAME_MISMATCH) is present in Response::getErrorCodes().
  • Documentation & Tests:
    • Updates README.md with a Response::hasErrorCode() usage example.
    • Expands ARCHITECTURE.md with DTO/immutable builder lifecycle details and a zero-dependency PSR-18 RequestMethod adapter recipe.
    • Adds ResponseTest::testHasErrorCode() maintaining 100% test coverage (98 tests, 282 assertions) with zero BC breaks.

@rowan-m
rowan-m force-pushed the feat/without-builders-and-has-error-code branch from 5305f00 to c013878 Compare November 18, 2026 21:53
@coveralls

coveralls commented Nov 18, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — feat/without-builders-and-has-error-code into main

@rowan-m
rowan-m force-pushed the feat/without-builders-and-has-error-code branch from c013878 to 3856f68 Compare November 18, 2026 22:35
@rowan-m
rowan-m force-pushed the feat/without-builders-and-has-error-code branch from 3856f68 to c566e25 Compare November 19, 2026 09:46
@rowan-m rowan-m changed the title feat: add without*() builder methods and Response::hasErrorCode() feat: add Response::hasErrorCode() and expand ARCHITECTURE.md Nov 19, 2026
@rowan-m
rowan-m merged commit b49702c into main Nov 19, 2026
14 checks passed
@rowan-m
rowan-m deleted the feat/without-builders-and-has-error-code branch November 19, 2026 10:22
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.

2 participants