giggsey/libphonenumber-for-php
A PHP port of Google's libphonenumber for parsing, formatting, storing, and validating international phone numbers, with geocoding, carrier, and timezone mapping.
libphonenumber metadata for CN, IR, NG, and US, plus short-number metadata for CN, carrier data for multiple calling codes, and timezone metadata. This improves alignment with current global telecom data but reinforces the need for disciplined metadata update cadence.isCarrierSpecific() now returns false when no region matches. No breaking API changes are identified.null, an exception, or a non-empty value. isCarrierSpecific() returning false when no region matches may affect carrier-based business rules.isCarrierSpecific() returning true in cases where no region matches? If so, revisit that rule.PhoneNumberUtil as a singleton in AppServiceProvider.isCarrierSpecific() behavior when no region matches.libphonenumber releases and package changelogs. Prioritize updates affecting active customer regions.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| BR number without carrier code formats as empty string | UI/API may show blank or fail validation unexpectedly | Handle empty-string results explicitly; add regression tests and domain validation. |
isCarrierSpecific() returns false when no region matches |
Carrier-based rules may change behavior | Review carrier-dependent logic and add fixtures for no-region-match cases. |
| Metadata updates change CN/IR/NG/US validation or formatting | Existing test numbers or customer records may produce different outputs | Add regression fixtures for updated regions; compare before/after upgrade. |
| Carrier data updates affect calling codes 27, 30, 60, 98, 234, 852 | Carrier mapping or fraud rules may shift | Revalidate carrier-dependent workflows and reporting. |
| Stale metadata after delaying upgrades | New number ranges or carrier changes may be misclassified | Automate dependency and metadata update cadence. |
| Locale mismatch for geocoding/carrier names | Incorrect display names | Define fallback locale and log unsupported locale requests. |
| PHP/Laravel version incompatibility | Package fails to load or tests fail | Validate in CI against the project support matrix; pin compatible versions. |
How can I help you explore Laravel packages today?