Skip to content

Commit

Permalink
Upstream metadata changes from Google for v8.13.44
Browse files Browse the repository at this point in the history
 - Updated phone metadata for region code(s):
   BF, CD, GM, NG, RO, SG, SN, TJ, UY
 - Updated short number metadata for region code(s): CA
  • Loading branch information
giggsey committed Sep 2, 2024
1 parent 68dba92 commit e0fcbaa
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 41 deletions.
2 changes: 1 addition & 1 deletion METADATA-VERSION.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
* For more information, look at the phing tasks in build.xml
* @internal
*/
return 'v8.13.43';
return 'v8.13.44';
2 changes: 1 addition & 1 deletion src/data/PhoneNumberMetadata_BF.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'example' => '20491234',
],
'mobile' => [
'pattern' => '(?:0[1-35-7]|5[0-8]|[67]\\d)\\d{6}',
'pattern' => '(?:0[1-7]|5[0-8]|[67]\\d)\\d{6}',
'example' => '70123456',
],
'tollFree' => [
Expand Down
28 changes: 26 additions & 2 deletions src/data/PhoneNumberMetadata_CD.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,25 @@
'id' => 'CD',
'countryCode' => 243,
'generalDesc' => [
'pattern' => '[189]\\d{8}|[1-68]\\d{6}',
'pattern' => '(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}',
'posLength' => [
7,
8,
9,
10,
],
],
'fixedLine' => [
'pattern' => '12\\d{7}|[1-6]\\d{6}',
'pattern' => '(?:(?:12|573)\\d\\d|276)\\d{5}|[1-6]\\d{6}',
'example' => '1234567',
],
'mobile' => [
'pattern' => '88\\d{5}|(?:8[0-69]|9[017-9])\\d{7}',
'example' => '991234567',
'posLength' => [
7,
9,
],
],
'tollFree' => [
'posLength' => [
Expand Down Expand Up @@ -91,6 +97,15 @@
'nationalPrefixFormattingRule' => '0$1',
'domesticCarrierCodeFormattingRule' => '',
],
[
'pattern' => '(\\d{2})(\\d{2})(\\d{4})',
'format' => '$1 $2 $3',
'leadingDigitsPatterns' => [
'2',
],
'nationalPrefixFormattingRule' => '0$1',
'domesticCarrierCodeFormattingRule' => '',
],
[
'pattern' => '(\\d{2})(\\d{3})(\\d{4})',
'format' => '$1 $2 $3',
Expand All @@ -109,5 +124,14 @@
'nationalPrefixFormattingRule' => '0$1',
'domesticCarrierCodeFormattingRule' => '',
],
[
'pattern' => '(\\d{2})(\\d{2})(\\d{3})(\\d{3})',
'format' => '$1 $2 $3 $4',
'leadingDigitsPatterns' => [
'5',
],
'nationalPrefixFormattingRule' => '0$1',
'domesticCarrierCodeFormattingRule' => '',
],
],
];
2 changes: 1 addition & 1 deletion src/data/PhoneNumberMetadata_GM.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'example' => '5661234',
],
'mobile' => [
'pattern' => '(?:[23679]\\d|5[0-489])\\d{5}',
'pattern' => '(?:[23679]\\d|4[015]|5[0-489])\\d{5}',
'example' => '3012345',
],
'tollFree' => [
Expand Down
32 changes: 6 additions & 26 deletions src/data/PhoneNumberMetadata_NG.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
'id' => 'NG',
'countryCode' => 234,
'generalDesc' => [
'pattern' => '2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}',
'pattern' => '38\\d{6}|[78]\\d{9,13}|(?:20|9\\d)\\d{8}',
'posLength' => [
7,
8,
10,
11,
Expand All @@ -21,21 +20,20 @@
14,
],
'posLengthLocal' => [
5,
6,
7,
],
],
'fixedLine' => [
'pattern' => '20(?:[1259]\\d|3[013-9]|4[1-8]|6[024-689]|7[1-79]|8[2-9])\\d{6}|(?:(?:[1-356]\\d|4[02-8]|8[2-9])\\d|9(?:0[3-9]|[1-9]\\d))\\d{5}|7(?:0(?:[013-689]\\d|2[0-24-9])\\d{3,4}|[1-79]\\d{6})|(?:[12]\\d|4[147]|5[14579]|6[1578]|7[1-3578])\\d{5}',
'example' => '18040123',
'pattern' => '(?:20(?:[1259]\\d|3[013-9]|4[1-8]|6[024-689]|7[1-79]|8[2-9])|38)\\d{6}',
'example' => '2033123456',
'posLength' => [
7,
8,
10,
],
'posLengthLocal' => [
5,
6,
7,
],
],
'mobile' => [
Expand Down Expand Up @@ -106,29 +104,11 @@
'nationalPrefix' => '0',
'nationalPrefixForParsing' => '0',
'numberFormat' => [
[
'pattern' => '(\\d{2})(\\d{2})(\\d{3})',
'format' => '$1 $2 $3',
'leadingDigitsPatterns' => [
'78',
],
'nationalPrefixFormattingRule' => '0$1',
'domesticCarrierCodeFormattingRule' => '',
],
[
'pattern' => '(\\d)(\\d{3})(\\d{3,4})',
'format' => '$1 $2 $3',
'leadingDigitsPatterns' => [
'[12]|9(?:0[3-9]|[1-9])',
],
'nationalPrefixFormattingRule' => '0$1',
'domesticCarrierCodeFormattingRule' => '',
],
[
'pattern' => '(\\d{2})(\\d{3})(\\d{2,3})',
'format' => '$1 $2 $3',
'leadingDigitsPatterns' => [
'[3-6]|7(?:0[0-689]|[1-79])|8[2-9]',
'3',
],
'nationalPrefixFormattingRule' => '0$1',
'domesticCarrierCodeFormattingRule' => '',
Expand Down
2 changes: 1 addition & 1 deletion src/data/PhoneNumberMetadata_RO.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'example' => '211234567',
],
'mobile' => [
'pattern' => '(?:630|702)0\\d{5}|(?:6(?:[04]0|2\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\d|8[03-8]|9[0-39]))\\d{6}',
'pattern' => '(?:630|702)0\\d{5}|(?:6(?:00|2\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\d|8[03-8]|9[0-39]))\\d{6}',
'example' => '712034567',
'posLength' => [
9,
Expand Down
2 changes: 1 addition & 1 deletion src/data/PhoneNumberMetadata_SG.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
],
],
'mobile' => [
'pattern' => '8(?:09[0-68]|95[0-2])\\d{4}|(?:8(?:0[1-8]|[1-8]\\d|9[0-4])|9[0-8]\\d)\\d{5}',
'pattern' => '8(?:09[0-689]|95[0-2])\\d{4}|(?:8(?:0[1-8]|[1-8]\\d|9[0-4])|9[0-8]\\d)\\d{5}',
'example' => '81234567',
'posLength' => [
8,
Expand Down
2 changes: 1 addition & 1 deletion src/data/PhoneNumberMetadata_SN.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'example' => '301012345',
],
'mobile' => [
'pattern' => '7(?:(?:[06-8]\\d|21|90)\\d|5(?:01|[19]0|25|[38]3|[4-7]\\d))\\d{5}',
'pattern' => '7(?:(?:[06-8]\\d|21|90)\\d|5(?:0[01]|[19]0|2[25]|[38]3|[4-7]\\d))\\d{5}',
'example' => '701234567',
],
'tollFree' => [
Expand Down
2 changes: 1 addition & 1 deletion src/data/PhoneNumberMetadata_TJ.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
],
],
'mobile' => [
'pattern' => '(?:33[03-9]|4(?:1[18]|4[02-479])|81[1-9])\\d{6}|(?:0[0-57-9]|1[017]|2[02]|[34]0|5[05]|7[01578]|8[078]|9\\d)\\d{7}',
'pattern' => '(?:33[03-9]|4(?:1[18]|4[02-479])|81[1-9])\\d{6}|(?:[09]\\d|1[017]|2[02]|[34]0|5[05]|7[01578]|8[078])\\d{7}',
'example' => '917123456',
],
'tollFree' => [
Expand Down
2 changes: 1 addition & 1 deletion src/data/PhoneNumberMetadata_UY.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
],
],
'fixedLine' => [
'pattern' => '(?:1(?:770|9(?:20|87))|(?:2\\d|4[2-7])\\d\\d)\\d{4}',
'pattern' => '(?:1(?:770|9(?:20|[89]7))|(?:2\\d|4[2-7])\\d\\d)\\d{4}',
'example' => '21231234',
'posLength' => [
8,
Expand Down
8 changes: 3 additions & 5 deletions src/data/ShortNumberMetadata_CA.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
'id' => 'CA',
'countryCode' => 0,
'generalDesc' => [
'pattern' => '[1-9]\\d\\d(?:\\d\\d(?:\\d(?:\\d{2})?)?)?',
'pattern' => '[1-9]\\d\\d(?:\\d{2,3})?',
'posLength' => [
3,
5,
6,
8,
],
],
'tollFree' => [
Expand All @@ -38,7 +37,7 @@
],
],
'shortCode' => [
'pattern' => '112|30000\\d{3}|[1-35-9]\\d{4,5}|[2-8]11|9(?:11|88)',
'pattern' => '[1-35-9]\\d{4,5}|112|[2-8]11|9(?:11|88)',
'example' => '112',
],
'standardRate' => [
Expand All @@ -54,12 +53,11 @@
],
],
'smsServices' => [
'pattern' => '300\\d{5}|[1-35-9]\\d{4,5}',
'pattern' => '[1-35-9]\\d{4,5}',
'example' => '10000',
'posLength' => [
5,
6,
8,
],
],
'internationalPrefix' => '',
Expand Down

0 comments on commit e0fcbaa

Please sign in to comment.