Skip to content

Releases: seven-io/php-client

v8.1.1

05 Feb 10:38

Choose a tag to compare

Bug Fixes

  • Fix missing property_exists checks for error and error_text fields in response classes

API responses may not always include these optional properties, causing PHP errors when accessing undefined object properties.

Affected classes:

  • SmsMessage
  • VoiceMessage
  • RcsMessage
  • JournalVoice
  • SubaccountCreate
  • SubaccountDelete
  • SubaccountAutoCharged
  • SubaccountTransferCredits

v8.1.0 - Improved Type Safety & Error Handling

12 Jan 12:43

Choose a tag to compare

What's New

New Features

  • ApiException class: Comprehensive exception for all API error codes (100-903) with descriptive messages
  • Configurable test recipient: Tests now support SEVEN_TEST_RECIPIENT environment variable

Improvements

  • Type safety: All Resource classes now use explicit type casts for consistent data handling
  • Better error handling: Client now properly handles numeric API responses and throws appropriate exceptions
  • Test infrastructure: Refactored BaseTest to AbstractTestCase for better test organization

Documentation

  • Updated README with API error codes table
  • Documented exception handling patterns
  • Updated PHP requirement to 8.2+ in documentation

Breaking Changes

None - this is a fully backwards-compatible release.

v8.0.2 - Fix PHP 8.5 Deprecation Warning

26 Nov 04:57
274e477

Choose a tag to compare

πŸ› Bug Fix

Removed Deprecated curl_close() Call

Problem:

  • PHP 8.5 introduced a deprecation warning for curl_close()
  • The function has had no effect since PHP 8.0 (curl handles are automatically closed)
  • Users upgrading to PHP 8.5 would see deprecation warnings in their logs

Solution:

  • Removed the unnecessary curl_close($ch) call from Client::request()
  • Since this project requires PHP >=8.2, the call was both unnecessary and problematic
  • No functional changes - curl handles are automatically cleaned up

Impact:

  • βœ… No more deprecation warnings in PHP 8.5+
  • βœ… Cleaner code without unnecessary function calls
  • βœ… No breaking changes for existing code

Files Changed:

  • src/Client.php

Credits:
Thanks to @justpilot for identifying this issue in #22 and proposing the initial fix!

Closes #22

v8.0.1 - Fix HLR Lookup Type Mismatch

06 Nov 09:49

Choose a tag to compare

πŸ› Bug Fix

Fixed HLR Lookup Type Error

Problem:

  • HLR lookup was failing with TypeError: Cannot assign int to property LookupHlr::$gsmCode of type ?string
  • This occurred after the seven.io API was updated to consistently return gsm_code as integer instead of string
  • Affected users on PHP 8.2+ with strict type checking

Solution:

  • Changed LookupHlr::$gsmCode property type from ?string to ?int
  • Updated getGsmCode() return type accordingly
  • Updated tests to expect integer values
  • Fixed README HLR example with correct method names

Impact:

  • βœ… HLR lookups now work correctly with the updated API
  • βœ… Type-safe handling of GSM error codes (0 = no error, 1-255 = error codes)
  • βœ… No breaking changes for existing code

Files Changed:

  • src/Resource/Lookup/LookupHlr.php
  • tests/LookupTest.php
  • README.md

Thanks to our users for reporting this issue!

v8.0.0

30 Sep 10:11

Choose a tag to compare

Fixed the return value for Seven\Api\Resource\Voice\VoiceMessage->getText().

v7.0.3

30 Sep 10:09

Choose a tag to compare

Add fix for implicitly nullable marked parameters for PHP 8.4.

v7.0.2

12 Sep 07:08

Choose a tag to compare

Fixed a bug where request signing failed for GET requests with no payload.

v7.0.1

11 Sep 08:17

Choose a tag to compare

Fixed a bug where the properties start and end in AnalyticsParams were not converted to the correct format.

v7.0.0

15 Jul 20:16

Choose a tag to compare

πŸš€ Release v7.0.0

πŸ’₯ Breaking Changes

  • sentWith parameter in Client constructor is now deprecated and ignored
  • Several resource properties changed from required to nullable
  • Enhanced error handling may throw exceptions in previously silent cases

✨ Features

  • Deprecate sentWith parameter and always use 'php-api' constant
  • Enhanced error handling with proper exception throwing
  • Improved error detection for quoted error codes
  • Better error messages with HTTP status codes

πŸ› Bug Fixes

  • Fixed RcsMessage class usage (was incorrectly using SmsMessage)
  • Set correct API error codes in exception classes (900-903)
  • Fixed date format in ContactsTest (German to ISO format)
  • Fixed InvalidApiKeyException not being thrown on error 900 (#19)

πŸ”§ Improvements

  • Improved null safety across lookup resources
  • Better resource payload building (only include non-null values)
  • More flexible test assertions to handle API variations
  • Enhanced test reliability with null checks
  • Removed unused JournalResource::replies method

πŸ“¦ Changed Files

  • Client error handling and sentWith deprecation
  • All exception classes with proper error codes
  • Lookup resources (Carrier, LookupHlr) with nullable properties
  • Contact and Properties resources with conditional payload building
  • ValidateForVoice with nullable sender
  • Comprehensive test improvements

πŸ€– Generated with Claude Code

v6.0.0

03 Dec 10:04

Choose a tag to compare