packagist giggsey/libphonenumber-for-php-lite 9.0.0

latest releases: 9.0.41, 9.0.40, 9.0.39...
18 months ago

Google has bumped libphonenumber to v9 for Java compatibility reasons. We've taken this opportunity to make some improvements to this library.

Most projects can upgrade safely without requiring any code changes.

PHP Changes

  • Function & parameter types: All functions and parameters now have explicit type definitions.
  • Backed Enums replace const classes:
    • Example: PhoneNumberType is now an enum instead of a class with constants.
    • If you previously referenced the constants directly, no changes are required.
    • If you stored constant values (integers), you'll need to use from() to load the corresponding enum.
  • Metadata storage improvement:
    • Metadata is now stored directly in PHP classes instead of arrays.
    • This improves performance when loading metadata but does not affect usage.

Google v9.0.0 changes: Feb 27, 2025

Metadata changes:
  • Updated phone metadata for region code(s):
    AR, BL, GF, GP, GY, HK, JP, MF, RE, SG, SL, SN, TJ, UG, VE, ZA

Don't miss a new libphonenumber-for-php-lite release

NewReleases is sending notifications on new releases.