Skip to content

Release v3.0.0

Latest

Choose a tag to compare

@mureithimaina mureithimaina released this 30 Sep 15:05

This release bumps the minimum PHP requirement to PHP 8.3, adds support for Guzzle 8, and introduces comprehensive coverage for Notifier v2.7.0 APIs alongside overall codebase modernisation.


Breaking Changes

  • Minimum PHP Version: Modernised minimum required PHP version to 8.3 (PHP 8.1 is EOL; PHP 8.2 reaches EOL on 31 Dec 2026).
  • Strict Gateway Typing: Notifier::gateway() now type-hints the $gateway parameter as string.

New Features & Enhancements

Notifier v2.7.0 API Support

  • Message Priority: Message::send() now accepts an optional priority parameter (accepts a MessagePriority enum case or an int).
  • Bulk Messaging: Added Message::sendMany() (aliased as bulk()) supporting the v2/message/send endpoint to send messages across multiple phone numbers, contacts, and labels, or dispatch personalised messages. Returns response data containing message, summary, and failed.
  • Contact Management: Introduced Notifier::contacts() (Contact) supporting list, create, fetch, update, and delete operations.
  • Label Management: Introduced Notifier::labels() (Label) supporting list, create, fetch, update/rename, and delete operations.
  • Pagination & Blank Responses: List endpoints now include pagination links and meta. HTTP 204 No Content responses are handled as successful empty payloads.
  • New Gateways: Added constants for Roam Tech (Constants::GATEWAY_ROAM_TECH / 'roam') and Razor SMS (Constants::GATEWAY_RAZOR_SMS / 'razor-sms').

Dependency & Codebase Modernisation

  • Guzzle 8 Support: Updated dependency constraint to allow guzzlehttp/guzzle: ^7.10 || ^8.2.
  • Type Safety & Modern Syntax: Modernised the entire codebase with strict types (declare(strict_types=1)), typed class constants, readonly promoted properties, native ResponseInterface typing, and match expressions for error message handling.

Bug Fixes & Refinements

  • Improved Error Messaging: Standardised error handling for 402, 404, and 422 HTTP status codes to surface the server's error message directly, with validation errors populated into $data['errors'] keyed by field.
  • Request Headers: Removed the default global Content-Type: multipart/form-data header; each API request now explicitly manages its own payload content type.

Full Changelog: v0.2.0...v0.3.0