Skip to content
This repository has been archived by the owner on Aug 21, 2018. It is now read-only.

I have add fixes for isset issues (Fixes problem with parsing US number, fixes isValidNumber fails on Windows) #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

resscode
Copy link

There are the next fixes:

  1. Fixes problem with parsing US number succeeds in tests fails in actual usage
  2. Fixes isValidNumber fails on Windows
  3. There were some problems with validation rules for validation rules of Ecuador and Guadeloupe, I have add fix for it

Please, check it and thanks for a good port of phonelib.

@Nephele
Copy link

Nephele commented Feb 26, 2013

I've been trying to assemble a working version of libphonenumber-for-PHP and wanted to incorporate your patches. However, after looking more closely at your patches, I had a couple questions:

  1. Shouldn't the isValidNumber code change be applied to all platforms, instead of just Windows? The EOL character could have been changed in the files regardless of the platform where the code is running, so it seems safest to explicitly remove \r and \n in all cases.
  2. Do you have any documentation for the validation rule changes for Ecuador and Guadeloupe? As I understand it, the source for all the metadata is google's original metadata file, at https://code.google.com/p/libphonenumber/source/browse/trunk/resources/PhoneNumberMetaData.xml. That metadata is being regularly maintained, so I'd expect its information to be accurate. However, none of your changes match what's in that metadata file. Also, all of the PhoneNumberMetadata* files should periodically be automatically regenerated from the original xml file, at which point any hard-coded changes to those files will disappear.
    Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants