libphonenumber-for-PHP icon indicating copy to clipboard operation
libphonenumber-for-PHP copied to clipboard

REGION_CODE_FOR_NON_GEO_ENTITY being removed from supportedRegions

Open MB34 opened this issue 9 years ago • 0 comments

I'm not sure if this package is still being supported because there haven't been any updates on issues since 2013. But...

In the init function, the call that removes the REGION_CODE_FOR_NON_GEO_ENTITY from the supportedRegions array removes US from the supportedRegions.

unset($this->supportedRegions[array_search(self::REGION_CODE_FOR_NON_GEO_ENTITY, $this->supportedRegions)]);

Why is this being done? It means that I cannot use this for US numbers.

I fixed it by replacing your init code with that by gissey's: https://github.com/giggsey/libphonenumber-for-php

But I'd really like to know why it was done this way and how to correctly use this package for US numbers.

MB34 avatar Jul 01 '15 14:07 MB34