propaganistas/laravel-phone
Add Google libphonenumber-powered phone number validation and utilities to Laravel. Validate numbers by country (static list or matching a companion country field), cast attributes, format and compare numbers, and access phone metadata using a simple PhoneNumber class.
Support Laravel 13
Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/6.0.2...6.0.3
Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/6.0.1...6.0.2
This version has feature-parity with the last version of 5.x, but the codebase has been reworked because libphonenumber shifted from using class constants to native enums. Most applications should be able to upgrade quite easily though, but no need to rush (see below). Read the upgrade guide for more information.
Additionally:
No. The last version of 5.x has been deliberately released to allow libphonenumber updates to be installed for a considerable period of time while staying on 5.x.
No, not for the (long?) time being. This package is quite feature-complete. You only need to upgrade if you want to use libphonenumber's enums or just want to stay ahead of things and be future-proof anyway.
libphonenumber v9.Note: this is the last minor/patch version in the v5 realm of this package.
libphonenumber shifted from using class constants to native enums. Conditional statements were added to achieve combined support for v8 and v9 while keeping Laravel-Phone as-is. This way, given that this package is quite feature-complete, updates on libphonenumber can still be installed for a considerable period of time without having to account for semantic breaking changes.
Starting from the next major version, Laravel-Phone will be reworked to fully harness the power of enums.
Added PhpDoc to casts for improved IDE-helper support (fixes #268 )
Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/5.3.4...5.3.5
Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/5.3.3...5.3.4
Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/5.3.2...5.3.3
Marking classes as internal to denote that they shouldn't be used publicly.
Bugfix for #250
Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/5.3.0...5.3.1
libphonenumber-for-php-lite instead of libphonenumber-for-php by @bperel in https://github.com/Propaganistas/Laravel-Phone/pull/248libphonenumber-for-php-lite is a lightweight drop-in replacement for libphonenumber-for-php which significantly reduces the package size being pulled in. libphonenumber-for-php-lite excludes geolocation, carrier information and short number info.
This is a non-breaking change for functionality provided by Laravel-Phone.
[!IMPORTANT]
If you have defined a macro, please review your code and if needed requiregiggsey/libphonenumber-for-phpas an explicit dependency in your project.
Added support for Laravel 11 Dropped support for Laravel 9 Dropped support for PHP 8.0
Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/5.1.1...5.2.0
Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/5.1.0...5.1.1
Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/5.0.3...5.1.0
The long-due codebase cleanup.
The package now minimally requires PHP 8.0 and Laravel 9.0. It also supports Laravel 10. All documented behavior is preserved. There are just some minor syntactical changes that might need your attention.
Please review the upgrade guide.
Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/4.4.3...4.4.4
Bugfix for #213 - Support international numbers prefixed with country code
Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/4.4.2...4.4.3
Bugfix: fixes #215
Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/4.4.1...4.4.2
Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/4.4.0...4.4.1
equals() and notEquals() methods to PhoneNumber by @PropaganistasFull Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/4.3.8...4.4.0
${var} string interpolation deprecation by @Ayesh in https://github.com/Propaganistas/Laravel-Phone/pull/198Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/4.3.7...4.3.8
Fixed deprecation notices on PHP 8.1
Added support for Laravel 9
Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/4.3.4...4.3.5
Improve auto detection validation
^4.0Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/4.3.1...4.3.2
Introduced two custom cast classes. See this section in the documentation.
Dropped support for Laravel 6, Laravel 7 and Laravel 8.0 - 8.8.
Added support for PHP 8.0
Added the getRawNumber() method to PhoneNumber to retrieve the original raw number.
Added support for Laravel 8.
How can I help you explore Laravel packages today?