Skip to content

Latest commit

 

History

History
116 lines (82 loc) · 4.31 KB

CHANGELOG.md

File metadata and controls

116 lines (82 loc) · 4.31 KB

Changelog

5.0.0 - 2026-08-24

  • Require at least PHP 8.2. Stay on 4.x if you need PHP 7.

  • These are now readonly classes:

    • AccountBalance
    • DeliveryStatusWebhook
    • IncomingMessageWebhook
    • Prices
    • Recipient
    • Result
    • Webhook

    None of them had setters, so this only breaks code that wrote to their properties directly. SMSMessage keeps its setters and is unchanged.

  • These are now final classes:

    • AccountBalance
    • CancelResult
    • DeliveryStatusWebhook
    • IncomingMessageWebhook
    • Prices
    • Recipient
    • Result

    SMSMessage and the abstract Webhook are deliberately not final. Subclassing any of the others never worked in any useful way, because every one builds instances with new self(), so the library always handed you a base instance rather than your subclass. Use composition, or construct them through their public constructors and constructFromArray() factories.

  • Added support for Guzzle 8.

  • Added native property types throughout.

  • Recipient::__construct() no longer accepts null for $tagValues. This was never intended to accept null.

  • GatewayAPIHandler::__construct() takes an optional Guzzle handler as its fourth argument, so you can control how requests are sent: retries, logging, a proxy, or a MockHandler to test against canned responses. See the readme.

  • Bumped phpunit/phpunit to ^11.0.

4.2.0 - 2025-12-19

  • Support PHP 8.5 (upgrade your Guzzle dependency to ^7.10.0 - see this issue).

4.1.0 - 2025-03-19

  • Add support for encoding via SMSMessage::ENCODING_UTF8 and SMSMessage::ENCODING_UCS2. Default is null, which uses UTF8. Note that UTF8 means that the GSM-7 character set is used. UCS2 adds the ability to use emojis, but increases the length (and hence cost) of your messages. See https://gatewayapi.com/docs/apis/rest/#basic-use.

4.0.0 - 2025-02-05

  • Require at least PHP 7.3.
  • Test against PHP 8.4.
  • Dropped support for Guzzle 6 (now requires Guzzle 7).
  • Updated requirements for guzzlehttp/oauth-subscriber to minimum 0.8.1 to address CVE-2025-21617.

3.3.1 - 2024-09-02

  • Test against PHP 8.3.
  • Round the total cost of messages to 5 decimal points.

3.3.0 - 2022-09-07

3.2.0 - 2022-02-27

  • Added support for version 0.6.* of guzzlehttp/oauth-subscriber.
  • Switched to GitHub actions instead of Travis.

3.1.2 - 2021-05-10

  • Added compatibility with Guzzle 7.
  • Adjustments to tests and nullability.

3.1.1 - 2021-05-09

  • Fixed use of incorrect Guzzle exception for detecting connection error vs. HTTP error.

3.1.0 - 2021-04-01

  • Support for PHP 8.0.

3.0.1 - 2020-10-01

  • Added the callback_url parameter to SMSMessage. Thanks to @Matthew-Kilpatrick.
  • Fixed some minor nullability and phpdoc inconsistencies.

3.0 - 2020-04-30

  • Refactored Constructable into a trait.
  • [BC] Webhook constructor is now protected and the subclass constructors are final. If you implement this class like it was meant to (using the static constructors) you won't need to make any changes to your code.

2.0.1 - 2020-03-10

  • Added setRecipients() to SMSMessage.

2.0 - 2020-03-05

  • [BC] Restructured namespaces for entity- and webhook-classes.
  • [BC] Removed PastSendTimeException and its handling as the API has changed so it no longer works.
  • Added SuccessfulResponseParsingException. You should check for this if you implement automatic retries of failed requests.
  • Made BaseException abstract.
  • Added Prices entity for price response.
  • Added Coveralls and Travis as well as more tests.

1.1 - 2020-03-03

  • Added more exceptions; GatewayServerException and GatewayRequestException. These allow you to distinguish between actual server errors and 400-range client/library errors. Backwards-compatibility is maintained as these extend BaseException.
  • Added proper handling of json_decode()-errors using json_last_error() instead of falsy-checks.
  • Cleaned up response parsing and added more tests.