Skip to content

4.0.1: explicit typed exception contracts

Choose a tag to compare

@axcherednikov axcherednikov released this 03 Oct 17:55
57749f8

Fixed

  • All 32 public API methods now explicitly declare GuzzleException and JsonException through @throws, including subscriptionsCreate(). Methods returning transaction DTOs also declare ResponseFormatException.
  • Completed exception declarations for response hydration, transaction model construction and filling, and SBP request validation.
  • Expanded the error-handling documentation and corrected the example to handle DTO validation and invalid transaction responses.

This patch preserves existing method signatures, exception types and runtime behavior. PHP uses PHPDoc @throws for exception contracts; input and return DTOs retain their existing native types.

Validation

  • 297 PHPUnit tests and 779 assertions passed, including 143 new checks for exception declarations and propagation, and API rejection responses.
  • PHPStan level 8, Rector dry run, PHP CS Fixer dry run, Composer validation and diff checks passed.