Skip to content

4.0.2: complete Throwable exception contract

Latest

Choose a tag to compare

@axcherednikov axcherednikov released this 03 Oct 19:09
5f81220

Fixed

All 32 public API methods, sendRequest(), and the internal request() now declare a single @throws Throwable contract. This corrects the incomplete exception lists in 4.0.1, including subscription methods.

Original exceptions and native PHP errors still reach consumers as the same objects, without wrapping. Native request and response types and runtime behavior remain unchanged. The README now includes the common boundary contract and a catch (Throwable) example.

Validation

  • 330 PHPUnit tests and 751 assertions passed.
  • Contract coverage enforces @throws Throwable at all API and request boundaries and verifies original exception/error propagation for every API method.
  • make phpstan now also checks missing exception declarations in Library.
  • Negative checks confirmed that removing public or internal request declarations makes the respective PHPUnit/PHPStan check fail.
  • PHPStan level 8, exception analysis, Rector, PHP CS Fixer, Composer validation and diff checks passed.