-
Require at least PHP 8.2. Stay on
4.xif you need PHP 7. -
These are now
readonlyclasses:AccountBalanceDeliveryStatusWebhookIncomingMessageWebhookPricesRecipientResultWebhook
None of them had setters, so this only breaks code that wrote to their properties directly.
SMSMessagekeeps its setters and is unchanged. -
These are now
finalclasses:AccountBalanceCancelResultDeliveryStatusWebhookIncomingMessageWebhookPricesRecipientResult
SMSMessageand the abstractWebhookare deliberately not final. Subclassing any of the others never worked in any useful way, because every one builds instances withnew self(), so the library always handed you a base instance rather than your subclass. Use composition, or construct them through their public constructors andconstructFromArray()factories. -
Added support for Guzzle 8.
-
Added native property types throughout.
-
Recipient::__construct()no longer acceptsnullfor$tagValues. This was never intended to acceptnull. -
GatewayAPIHandler::__construct()takes an optional Guzzle handler as its fourth argument, so you can control how requests are sent: retries, logging, a proxy, or aMockHandlerto test against canned responses. See the readme. -
Bumped
phpunit/phpunitto^11.0.
- Support PHP 8.5 (upgrade your Guzzle dependency to
^7.10.0- see this issue).
- Add support for
encodingviaSMSMessage::ENCODING_UTF8andSMSMessage::ENCODING_UCS2. Default isnull, which usesUTF8. Note thatUTF8means that the GSM-7 character set is used.UCS2adds the ability to use emojis, but increases the length (and hence cost) of your messages. See https://gatewayapi.com/docs/apis/rest/#basic-use.
- 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-subscriberto minimum0.8.1to address CVE-2025-21617.
- Test against PHP 8.3.
- Round the total cost of messages to 5 decimal points.
- Added support for EU-only mode: https://gatewayapi.com/blog/new-eu-setup-for-gatewayapi-customers/ - pass
trueto the optional constructor argument and togetPries()to use the EU-only mode. - Test against PHP 8.2
- Added support for version
0.6.*ofguzzlehttp/oauth-subscriber. - Switched to GitHub actions instead of Travis.
- Added compatibility with Guzzle 7.
- Adjustments to tests and nullability.
- Fixed use of incorrect Guzzle exception for detecting connection error vs. HTTP error.
- Support for PHP 8.0.
- Added the
callback_urlparameter toSMSMessage. Thanks to @Matthew-Kilpatrick. - Fixed some minor nullability and phpdoc inconsistencies.
- Refactored
Constructableinto a trait. - [BC]
Webhookconstructor is nowprotectedand the subclass constructors arefinal. 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.
- Added
setRecipients()toSMSMessage.
- [BC] Restructured namespaces for entity- and webhook-classes.
- [BC] Removed
PastSendTimeExceptionand 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
BaseExceptionabstract. - Added
Pricesentity for price response. - Added Coveralls and Travis as well as more tests.
- Added more exceptions;
GatewayServerExceptionandGatewayRequestException. These allow you to distinguish between actual server errors and 400-range client/library errors. Backwards-compatibility is maintained as these extendBaseException. - Added proper handling of
json_decode()-errors usingjson_last_error()instead of falsy-checks. - Cleaned up response parsing and added more tests.