Skip to content

Commit b3362a3

Browse files
authored
Merge pull request #668 from giggsey/upstream-8.13.53
Upstream changes from Google for v8.13.53
2 parents cc9a82b + e8f3a15 commit b3362a3

23 files changed

+99
-83
lines changed

METADATA-VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# It can be a commit, branch or tag of the https://github.com/google/libphonenumber project
33
#
44
# For more information, look at the phing tasks in build.xml
5-
v8.13.52
5+
v8.13.53

src/PhoneNumberUtil.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2776,6 +2776,9 @@ public function formatOutOfCountryKeepingAlphaChars(PhoneNumber $number, $region
27762776
$regionCode = $this->getRegionCodeForCountryCode($countryCode);
27772777
// Metadata cannot be null because the country calling code is valid.
27782778
$metadataForRegion = $this->getMetadataForRegionOrCallingCode($countryCode, $regionCode);
2779+
// Strip any extension
2780+
$this->maybeStripExtension($formattedNumber);
2781+
// Append the formatted extension
27792782
$this->maybeAppendFormattedExtension(
27802783
$number,
27812784
$metadataForRegion,
@@ -3675,6 +3678,13 @@ public function isPossibleNumber($number, $regionDialingFrom = null)
36753678
* length (obviously includes the length of area codes for fixed line numbers), it will
36763679
* return false for the subscriber-number-only version.
36773680
* </ol>
3681+
*
3682+
* There is a known <a href="https://issuetracker.google.com/issues/335892662">issue</a> with this
3683+
* method: if a number is possible only in a certain region among several regions that share the
3684+
* same country calling code, this method will consider only the "main" region. For example,
3685+
* +1310xxxx are valid numbers in Canada. However, they are not possible in the US. As a result,
3686+
* this method will return IS_POSSIBLE_LOCAL_ONLY for +1310xxxx.
3687+
*
36783688
* @param PhoneNumber $number the number that needs to be checked
36793689
* @return int a ValidationResult object which indicates whether the number is possible
36803690
*/
@@ -3705,6 +3715,12 @@ public function isPossibleNumberWithReason(PhoneNumber $number)
37053715
* return false for the subscriber-number-only version.
37063716
* </ol>
37073717
*
3718+
* There is a known <a href="https://issuetracker.google.com/issues/335892662">issue</a> with this
3719+
* method: if a number is possible only in a certain region among several regions that share the
3720+
* same country calling code, this method will consider only the "main" region. For example,
3721+
* +1310xxxx are valid numbers in Canada. However, they are not possible in the US. As a result,
3722+
* this method will return IS_POSSIBLE_LOCAL_ONLY for +1310xxxx.
3723+
*
37083724
* @param PhoneNumber $number the number that needs to be checked
37093725
* @param int $type the PhoneNumberType we are interested in
37103726
* @return int a ValidationResult object which indicates whether the number is possible

src/carrier/data/en/212.php

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@
1414
return [
1515
21260 => 'Inwi',
1616
21261 => 'Maroc Telecom',
17-
212612 => 'Méditel',
18-
212614 => 'Méditel',
19-
212617 => 'Méditel',
20-
212619 => 'Méditel',
21-
212620 => 'Méditel',
22-
212621 => 'Méditel',
17+
212612 => 'Orange',
18+
212614 => 'Orange',
19+
212617 => 'Orange',
20+
212619 => 'Orange',
21+
212620 => 'Orange',
22+
212621 => 'Orange',
2323
212622 => 'Maroc Telecom',
2424
212623 => 'Maroc Telecom',
2525
212624 => 'Maroc Telecom',
26-
212625 => 'Méditel',
26+
212625 => 'Orange',
2727
212626 => 'Inwi',
2828
212627 => 'Inwi',
2929
212628 => 'Maroc Telecom',
3030
212629 => 'Inwi',
3131
212630 => 'Inwi',
32-
212631 => 'Méditel',
33-
212632 => 'Méditel',
32+
212631 => 'Orange',
33+
212632 => 'Orange',
3434
212633 => 'Inwi',
3535
212634 => 'Inwi',
3636
212635 => 'Inwi',
@@ -42,42 +42,42 @@
4242
212641 => 'Maroc Telecom',
4343
212642 => 'Maroc Telecom',
4444
212643 => 'Maroc Telecom',
45-
212644 => 'Méditel',
46-
212645 => 'Méditel',
45+
212644 => 'Orange',
46+
212645 => 'Orange',
4747
212646 => 'Inwi',
4848
212647 => 'Inwi',
4949
212648 => 'Maroc Telecom',
50-
212649 => 'Méditel',
50+
212649 => 'Orange',
5151
21265 => 'Maroc Telecom',
52-
212656 => 'Méditel',
53-
212657 => 'Méditel',
54-
212660 => 'Méditel',
52+
212656 => 'Orange',
53+
212657 => 'Orange',
54+
212660 => 'Orange',
5555
212661 => 'Maroc Telecom',
5656
212662 => 'Maroc Telecom',
57-
212663 => 'Méditel',
58-
212664 => 'Méditel',
59-
212665 => 'Méditel',
57+
212663 => 'Orange',
58+
212664 => 'Orange',
59+
212665 => 'Orange',
6060
212666 => 'Maroc Telecom',
6161
212667 => 'Maroc Telecom',
6262
212668 => 'Maroc Telecom',
63-
212669 => 'Méditel',
63+
212669 => 'Orange',
6464
21267 => 'Maroc Telecom',
65-
212674 => 'Méditel',
66-
212675 => 'Méditel',
67-
212679 => 'Méditel',
65+
212674 => 'Orange',
66+
212675 => 'Orange',
67+
212679 => 'Orange',
6868
212680 => 'Inwi',
6969
212681 => 'Inwi',
7070
212682 => 'Maroc Telecom',
71-
212684 => 'Méditel',
71+
212684 => 'Orange',
7272
212687 => 'Inwi',
73-
212688 => 'Méditel',
73+
212688 => 'Orange',
7474
212689 => 'Maroc Telecom',
7575
212690 => 'Inwi',
76-
212691 => 'Méditel',
76+
212691 => 'Orange',
7777
2126921 => 'Al Hourria Telecom',
7878
2126922 => 'Al Hourria Telecom',
79-
212693 => 'Méditel',
80-
212694 => 'Méditel',
79+
212693 => 'Orange',
80+
212694 => 'Orange',
8181
212695 => 'Inwi',
8282
212696 => 'Maroc Telecom',
8383
212697 => 'Maroc Telecom',
@@ -88,6 +88,6 @@
8888
21272 => 'Inwi',
8989
21275 => 'Maroc Telecom',
9090
21276 => 'Maroc Telecom',
91-
21277 => 'Méditel',
92-
21278 => 'Méditel',
91+
21277 => 'Orange',
92+
21278 => 'Orange',
9393
];

src/carrier/data/en/229.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,10 @@
1212
*/
1313

1414
return [
15-
2290140 => 'SBIN',
16-
2290141 => 'SBIN',
15+
229014 => 'SBIN',
1716
2290142 => 'MTN',
18-
2290143 => 'SBIN',
19-
2290144 => 'SBIN',
2017
2290145 => 'Moov',
2118
2290146 => 'MTN',
22-
2290147 => 'SBIN',
23-
2290148 => 'SBIN',
2419
229015 => 'MTN',
2520
2290155 => 'Moov',
2621
2290158 => 'Moov',
@@ -47,7 +42,6 @@
4742
22946 => 'MTN',
4843
2295 => 'MTN',
4944
22955 => 'Moov',
50-
22956 => 'Moov',
5145
22960 => 'Moov',
5246
22961 => 'MTN',
5347
22962 => 'MTN',

src/carrier/data/en/252.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
25270 => 'Golis Telecom',
3232
25271 => 'Amtel',
3333
25272 => 'Golis Telecom',
34+
25276 => 'Somtel',
3435
25279 => 'Somtel',
3536
25280 => 'Somali Networks',
3637
25288 => 'Somali Networks',

src/carrier/data/en/351.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757
3519280 => 'NOWO',
5858
3519281 => 'NOWO',
5959
3519282 => 'Digi Communications',
60+
3519283 => 'Digi Communications',
61+
3519284 => 'Digi Communications',
6062
3519285 => 'ONITELECOM',
6163
3519290 => 'NOS',
6264
3519291 => 'NOS',

src/carrier/data/en/371.php

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,23 @@
1313

1414
return [
1515
371200 => 'Tele2',
16-
3712010 => 'Bite Latvia',
17-
3712011 => 'Bite Latvia',
18-
3712012 => 'Bite Latvia',
19-
3712013 => 'Bite Latvia',
20-
3712014 => 'Bite Latvia',
21-
3712015 => 'Bite Latvia',
22-
3712016 => 'Bite Latvia',
23-
3712017 => 'Bite Latvia',
24-
3712019 => 'Bite Latvia',
16+
371201 => 'Bite Latvia',
17+
3712018 => 'Tele2',
2518
371202 => 'LMT',
2619
371203 => 'Tele2',
2720
371204 => 'Tele2',
2821
371205 => 'Tele2',
2922
371206 => 'Bite Latvia',
3023
371207 => 'Bite Latvia',
31-
3712080 => 'Bite Latvia',
32-
3712081 => 'Bite Latvia',
33-
3712082 => 'Bite Latvia',
34-
3712083 => 'Bite Latvia',
35-
3712084 => 'Bite Latvia',
36-
3712085 => 'Bite Latvia',
37-
3712086 => 'Bite Latvia',
38-
3712087 => 'Bite Latvia',
39-
3712088 => 'Bite Latvia',
24+
371208 => 'Bite Latvia',
25+
3712089 => 'Tele2',
26+
3712091 => 'Tele2',
27+
3712092 => 'Tele2',
28+
3712093 => 'Tele2',
4029
3712094 => 'Triatel',
30+
3712095 => 'Tele2',
31+
3712096 => 'Tele2',
32+
3712097 => 'Tele2',
4133
37121 => 'Bite Latvia',
4234
3712200 => 'LMT',
4335
3712201 => 'LMT',
@@ -75,10 +67,7 @@
7567
3712317 => 'Bite Latvia',
7668
3712320 => 'Bite Latvia',
7769
3712322 => 'Bite Latvia',
78-
37123230 => 'Tele2',
79-
37123232 => 'Tele2',
80-
37123233 => 'Tele2',
81-
37123238 => 'Tele2',
70+
3712323 => 'Tele2',
8271
3712327 => 'Bite Latvia',
8372
3712328 => 'LMT',
8473
3712330 => 'Bite Latvia',

src/carrier/data/en/389.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
38972 => 'T-Mobile',
1818
38973 => 'A1',
1919
389736 => 'T-Mobile',
20-
3897370 => 'T-Mobile',
21-
3897371 => 'T-Mobile',
2220
389742 => 'T-Mobile',
2321
3897421 => 'Mobik',
2422
389746 => 'T-Mobile',

src/carrier/data/en/597.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@
1717
59774 => 'Digicel',
1818
59775 => 'Telesur',
1919
59776 => 'Digicel',
20-
597770 => 'Telesur',
21-
597771 => 'Telesur',
22-
597772 => 'Telesur',
23-
597773 => 'Telesur',
24-
597774 => 'Telesur',
20+
59777 => 'Telesur',
2521
5978 => 'Telesur',
2622
59781 => 'Digicel',
2723
59782 => 'Digicel',

src/carrier/data/en/680.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
68045 => 'PMCI',
1616
68046 => 'PMCI',
1717
68077 => 'PalauCel',
18+
68078 => 'PalauCel',
1819
68083 => 'PMCI',
1920
68088 => 'PalauTel',
2021
];

0 commit comments

Comments
 (0)