Skip to content

v8.0.1 - Fix HLR Lookup Type Mismatch

Latest

Choose a tag to compare

@cl77 cl77 released this 06 Nov 09:49

πŸ› 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!