Closed gsteel closed 2 years ago
IMO not to be dragged into laminas/laminas-i18n
, but into something like laminas/laminas-i18n-phone-number
, which would then be an adapter with the declared external dependency.
@Ocramius - would you expect to drop the validator here in a future major of i18n
? I've probably got most of what would be needed here in other projects…
would you expect to drop the validator here in a future major of
i18n
?
Something like that, with a smooth migration path (find/replace-only, perhaps)
@Ocramius - Here's an initial stab at laminas-i18n-phone-number
https://github.com/gsteel/laminas-i18n-phone-number
@gsteel IMO bring it up with next TSC agenda?
Also relevant to #77 - Closing this now pending introduction of the new lib at https://github.com/laminas/laminas-i18n-phone-number
RFC
Background
The phone number validator must take a lot of maintenance to keep up with global changes to area codes and number formats etc.
I've used giggsey/libphonenumber-for-php on a number of projects and found it to be well maintained and frequently updated with new information from Google's libphonenumber project.
Proposal(s)
giggsey/libphonenumber-for-php
as a dependencyPotential BC Breaks
There may not be a 1-1 mapping between the existing possible number types and those found in https://github.com/giggsey/libphonenumber-for-php/blob/master/src/PhoneNumberType.php
Appendix
Relevant to issues #73 and #3