Skip to content

1.5.1

Choose a tag to compare

@rowan-m rowan-m released this 22 Sep 09:36
· 10 commits to main since this release
Immutable release. Only release title and notes can be modified.

Backward Compatibility Restoration (1.5.1)

Version 1.5.0 inadvertently introduced breaking changes to the public PHP API in a minor release (#628), including strict parameter/return type hints on public methods and RequestMethod::submit(), readonly modifiers on Response and RequestParameters, and the removal of the RequestMethod\Curl and RequestMethod\Socket wrapper classes.

What's Changed in 1.5.1

  • Restored full 1.4.2 public API compatibility (#633 by @SNO7E-G, reviewed by @acoulton):
    • Restored untyped public method signatures (with PHPDoc annotations) across ReCaptcha, Response, RequestParameters, and RequestMethod::submit().
    • Removed readonly from Response and RequestParameters so subclasses and test doubles (PHPUnit::createMock()) work as expected.
    • Restored RequestMethod\Curl and RequestMethod\Socket wrapper classes and legacy constructor parameter order (new CurlPost(?Curl $curl = null, ?string $siteVerifyUrl = null) and new SocketPost(?Socket $socket = null, ?string $siteVerifyUrl = null)).
  • Documentation & Tooling:
    • Fixed ReCaptcha::RESPONSE_KEY constant name in README.md.
    • Configured PHPStan (level: 2, treatPhpDocTypesAsCertain: false) for the 1.x compatibility line without requiring a baseline file.

Note on 2.0.0: The strict type hints, readonly DTOs, and constructor modernizations introduced in 1.5.0 have been preserved on the 2.x branch and will be released under major version 2.0.0.