Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to newest libphonenumber #62

Merged
merged 56 commits into from
Apr 17, 2023

Conversation

szymon-jez
Copy link
Member

@szymon-jez szymon-jez commented Mar 16, 2023

Refs #43

The code in this branch up to commit 43111ff comes from a clone of this repository.

This is an aim to port that code over to this repo and release it in the widely used hex package.

TODOs

  • Contact @kamilkowalski from @surgeventures
  • Remove CircleCI - porting some functionality it has (like testing with different Elixir versions, more linters) could be done in a separate PR
  • Adjust documentation

jeizsm and others added 30 commits January 24, 2017 13:53
`PhoneNumberMetadata.xml` is sourced from original Google source with
release 8.11.4 google/libphonenumber@876268e
PhoneNumberMetadata.xml is sourced from the original Google repo,
release 8.12.9, google/libphonenumber@3ec5f5a
PhoneNumberMetadata.xml is sourced from the original Google repo,
release 8.12.18, google/libphonenumber@4c532d9
* Update the validation rules to 8.12.28

* Change gb invalid number
@szymon-jez szymon-jez changed the title WIP: Update to newest libphonenumber Update to newest libphonenumber Mar 16, 2023
@kamilkowalski kamilkowalski marked this pull request as ready for review April 7, 2023 17:34
Copy link
Collaborator

@josemrb josemrb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Checking if a number is possible didn't take the number type into account anyway, since in
`test_number_length/2` we were always passing `PhonenUmberTypes.unknown()`. This change prevents
the code from pretending like it does support validating by types. If we want to re-introduce it,
we should to so properly.
@kamilkowalski
Copy link
Member

@szymon-jez Re: our Slack conversation and for documentation's sake - I tried making the updates compatible with Elixir 1.4 but I don't think it's worth it. Elixir 1.4 was released 6 years ago - packages like plug started requiring Elixir 1.10 last year. I'm proposing we do the same - Elixir 1.10 is already 2 years old.

Copy link
Member Author

@szymon-jez szymon-jez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Great work @kamilkowalski and co. (@surgeventures)!

(Reviewed code and tested in a production app's test suite)

@szymon-jez szymon-jez merged commit c4a21bb into master Apr 17, 2023
@szymon-jez szymon-jez deleted the surgeventures/update-to-newest-libphonenumber branch April 17, 2023 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.