Skip to content

Commit

Permalink
Merge pull request #51 from giggsey/upstream-8.13.33
Browse files Browse the repository at this point in the history
Upstream metadata changes from Google for v8.13.33
  • Loading branch information
giggsey authored Mar 25, 2024
2 parents 74d0f7a + 776adc9 commit 9e2489e
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion METADATA-VERSION.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# It can be a commit, branch or tag of the https://github.com/google/libphonenumber project
#
# For more information, look at the phing tasks in build.xml
v8.13.32
v8.13.33
2 changes: 1 addition & 1 deletion src/PhoneNumberUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class PhoneNumberUtil
//protected const UNWANTED_END_CHAR_PATTERN = '[[\\P{N}&&\\P{L}]&&[^#]]+$';
protected const UNWANTED_END_CHAR_PATTERN = '[^' . self::DIGITS . self::VALID_ALPHA . '#]+$';
protected const DIALLABLE_CHAR_MAPPINGS = self::ASCII_DIGIT_MAPPINGS
+ [self::PLUS_SIGN => self::PLUS_SIGN]
+ [self::PLUS_SIGN => self::PLUS_SIGN]
+ ['*' => '*', '#' => '#'];


Expand Down
4 changes: 2 additions & 2 deletions src/data/PhoneNumberMetadata_CA.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
'fixedLine' =>
[
'NationalNumberPattern' => '(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}',
'NationalNumberPattern' => '(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}',
'ExampleNumber' => '5062345678',
'PossibleLength' =>
[
Expand All @@ -31,7 +31,7 @@
],
'mobile' =>
[
'NationalNumberPattern' => '(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}',
'NationalNumberPattern' => '(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}',
'ExampleNumber' => '5062345678',
'PossibleLength' =>
[
Expand Down
2 changes: 1 addition & 1 deletion src/data/PhoneNumberMetadata_GE.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
],
'mobile' =>
[
'NationalNumberPattern' => '5(?:(?:(?:0555|1(?:[17]77|555))[5-9]|757(?:7[7-9]|8[01]))\\d|22252[0-4])\\d\\d|(?:5(?:00(?:0\\d|11|22|33|44|5[05]|77|88|9[09])|1(?:1(?:00|[124]\\d|3[01])|4\\d\\d)|(?:44|68)\\d\\d|5(?:[0157-9]\\d\\d|200)|7(?:[0147-9]\\d\\d|5(?:00|[57]5))|8(?:0(?:[018]\\d|2[0-4])|58[89]|8(?:55|88))|9(?:090|[1-35-9]\\d\\d))|790\\d\\d)\\d{4}|5(?:0(?:0[17]0|505)|1(?:0[01]0|1(?:07|33|51))|2(?:0[02]0|2[25]2)|3(?:0[03]0|3[35]3)|(?:40[04]|900)0|5222)[0-4]\\d{3}',
'NationalNumberPattern' => '5(?:(?:(?:0555|1(?:[17]77|555))[5-9]|757(?:7[7-9]|8[01]))\\d|22252[0-4])\\d\\d|(?:5(?:0(?:0(?:0\\d|11|22|33|44|5[05]|77|88|9[09])|111)|1(?:1(?:00|[124]\\d|3[01])|4\\d\\d)|(?:44|68)\\d\\d|5(?:[0157-9]\\d\\d|200)|7(?:[0147-9]\\d\\d|5(?:00|[57]5))|8(?:0(?:[018]\\d|2[0-4])|58[89]|8(?:55|88))|9(?:090|[1-35-9]\\d\\d))|790\\d\\d)\\d{4}|5(?:0(?:0[17]0|505)|1(?:0[01]0|1(?:07|33|51))|2(?:0[02]0|2[25]2)|3(?:0[03]0|3[35]3)|(?:40[04]|900)0|5222)[0-4]\\d{3}',
'ExampleNumber' => '555123456',
],
'tollFree' =>
Expand Down
2 changes: 1 addition & 1 deletion src/data/PhoneNumberMetadata_IL.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
],
'voip' =>
[
'NationalNumberPattern' => '7(?:38(?:0\\d|5[09]|88)|8(?:33|55|77|81)\\d)\\d{4}|7(?:18|2[23]|3[237]|47|6[258]|7\\d|82|9[2-9])\\d{6}',
'NationalNumberPattern' => '7(?:38(?:0\\d|5[019]|88)|8(?:33|55|77|81)\\d)\\d{4}|7(?:18|2[23]|3[237]|47|6[258]|7\\d|82|9[2-9])\\d{6}',
'ExampleNumber' => '771234567',
'PossibleLength' =>
[
Expand Down
10 changes: 5 additions & 5 deletions src/data/PhoneNumberMetadata_LT.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
'id' => 'LT',
'countryCode' => 370,
'internationalPrefix' => '00',
'nationalPrefix' => '8',
'nationalPrefix' => '0',
'nationalPrefixForParsing' => '[08]',
'sameMobileAndFixedLinePattern' => false,
'numberFormat' =>
Expand All @@ -92,7 +92,7 @@
[
0 => '52[0-7]',
],
'nationalPrefixFormattingRule' => '(8-$1)',
'nationalPrefixFormattingRule' => '(0-$1)',
'domesticCarrierCodeFormattingRule' => '',
'nationalPrefixOptionalWhenFormatting' => true,
],
Expand All @@ -104,7 +104,7 @@
[
0 => '[7-9]',
],
'nationalPrefixFormattingRule' => '8 $1',
'nationalPrefixFormattingRule' => '0 $1',
'domesticCarrierCodeFormattingRule' => '',
'nationalPrefixOptionalWhenFormatting' => true,
],
Expand All @@ -116,7 +116,7 @@
[
0 => '37|4(?:[15]|6[1-8])',
],
'nationalPrefixFormattingRule' => '(8-$1)',
'nationalPrefixFormattingRule' => '(0-$1)',
'domesticCarrierCodeFormattingRule' => '',
'nationalPrefixOptionalWhenFormatting' => true,
],
Expand All @@ -128,7 +128,7 @@
[
0 => '[3-6]',
],
'nationalPrefixFormattingRule' => '(8-$1)',
'nationalPrefixFormattingRule' => '(0-$1)',
'domesticCarrierCodeFormattingRule' => '',
'nationalPrefixOptionalWhenFormatting' => true,
],
Expand Down
6 changes: 3 additions & 3 deletions src/data/PhoneNumberMetadata_TM.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
return [
'generalDesc' =>
[
'NationalNumberPattern' => '[1-6]\\d{7}',
'NationalNumberPattern' => '(?:[1-6]\\d|71)\\d{6}',
'PossibleLength' =>
[
0 => 8,
Expand All @@ -22,7 +22,7 @@
],
'mobile' =>
[
'NationalNumberPattern' => '6\\d{7}',
'NationalNumberPattern' => '(?:6\\d|71)\\d{6}',
'ExampleNumber' => '66123456',
],
'tollFree' =>
Expand Down Expand Up @@ -127,7 +127,7 @@
'format' => '$1 $2',
'leadingDigitsPatterns' =>
[
0 => '6',
0 => '[67]',
],
'nationalPrefixFormattingRule' => '8 $1',
'domesticCarrierCodeFormattingRule' => '',
Expand Down
2 changes: 1 addition & 1 deletion src/data/PhoneNumberMetadata_TZ.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
'mobile' =>
[
'NationalNumberPattern' => '77[2-9]\\d{6}|(?:6[125-9]|7[13-689])\\d{7}',
'NationalNumberPattern' => '(?:6[125-9]|7[13-9])\\d{7}',
'ExampleNumber' => '621234567',
],
'tollFree' =>
Expand Down
2 changes: 1 addition & 1 deletion src/data/PhoneNumberMetadata_UA.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
],
'mobile' =>
[
'NationalNumberPattern' => '(?:39|50|6[36-8]|7[1-3]|9[1-9])\\d{7}',
'NationalNumberPattern' => '(?:39|50|6[36-8]|7[1-357]|9[1-9])\\d{7}',
'ExampleNumber' => '501234567',
'PossibleLength' =>
[
Expand Down
2 changes: 1 addition & 1 deletion src/data/PhoneNumberMetadata_UG.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
],
'mobile' =>
[
'NationalNumberPattern' => '72(?:[48]0|6[01])\\d{5}|7(?:[015-8]\\d|20|36|4[0-4]|9[89])\\d{6}',
'NationalNumberPattern' => '72(?:[48]0|6[01])\\d{5}|7(?:[015-8]\\d|20|36|4[0-5]|9[89])\\d{6}',
'ExampleNumber' => '712345678',
],
'tollFree' =>
Expand Down
4 changes: 2 additions & 2 deletions src/data/PhoneNumberMetadata_US.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],
'fixedLine' =>
[
'NationalNumberPattern' => '(?:5056(?:[0-35-9]\\d|4[468])|7302[0-3]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}',
'NationalNumberPattern' => '(?:5056(?:[0-35-9]\\d|4[468])|7302[0-3]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}',
'ExampleNumber' => '2015550123',
'PossibleLengthLocalOnly' =>
[
Expand All @@ -30,7 +30,7 @@
],
'mobile' =>
[
'NationalNumberPattern' => '(?:5056(?:[0-35-9]\\d|4[468])|7302[0-3]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}',
'NationalNumberPattern' => '(?:5056(?:[0-35-9]\\d|4[468])|7302[0-3]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}',
'ExampleNumber' => '2015550123',
'PossibleLengthLocalOnly' =>
[
Expand Down

0 comments on commit 9e2489e

Please sign in to comment.