Skip to content

Commit e5f5f63

Browse files
committed
Merge branch '3.3' into 3.4
* 3.3: [Intl] Update ICU data to 60.1 [YAML] Allow to parse custom tags when linting yaml files [HttpKernel][Debug] Remove noise from stack frames of deprecations [Validator] Fix Costa Rica IBAN format [Bridge/ProxyManager] Remove direct reference to value holder property [Validator] Add Belarus IBAN format [FrameworkBundle] Specifically inject the debug dispatcher in the collector [WebserverBundle] fixed the bug that caused that the webserver would … update the pull request template [Stopwatch] minor fix
2 parents b88e6a2 + ec07395 commit e5f5f63

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

Constraints/IbanValidator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ class IbanValidator extends ConstraintValidator
5050
'BH' => 'BH\d{2}[A-Z]{4}[\dA-Z]{14}', // Bahrain
5151
'BI' => 'BI\d{2}\d{12}', // Burundi
5252
'BJ' => 'BJ\d{2}[A-Z]{1}\d{23}', // Benin
53+
'BY' => 'BY\d{2}[\dA-Z]{4}\d{4}[\dA-Z]{16}', // Belarus - https://bank.codes/iban/structure/belarus/
5354
'BL' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Saint Barthelemy
5455
'BR' => 'BR\d{2}\d{8}\d{5}\d{10}[A-Z][\dA-Z]', // Brazil
5556
'CG' => 'CG\d{2}\d{23}', // Congo
5657
'CH' => 'CH\d{2}\d{5}[\dA-Z]{12}', // Switzerland
5758
'CI' => 'CI\d{2}[A-Z]{1}\d{23}', // Ivory Coast
5859
'CM' => 'CM\d{2}\d{23}', // Cameron
59-
'CR' => 'CR\d{2}\d{3}\d{14}', // Costa Rica
60+
'CR' => 'CR\d{2}0\d{3}\d{14}', // Costa Rica
6061
'CV' => 'CV\d{2}\d{21}', // Cape Verde
6162
'CY' => 'CY\d{2}\d{3}\d{5}[\dA-Z]{16}', // Cyprus
6263
'CZ' => 'CZ\d{2}\d{20}', // Czech Republic

Tests/Constraints/IbanValidatorTest.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ public function getValidIbans()
6363
array('BE62 5100 0754 7061'), //Belgium
6464
array('BA39 1290 0794 0102 8494'), //Bosnia and Herzegovina
6565
array('BG80 BNBG 9661 1020 3456 78'), //Bulgaria
66+
array('BY 13 NBRB 3600 900000002Z00AB00'), //Belarus
67+
array('BY13 NBRB 3600 900000002Z00AB00'), //Belarus
68+
array('BY22NB23324232T78YR7823HR32U'), //Belarus
6669
array('HR12 1001 0051 8630 0016 0'), //Croatia
6770
array('CY17 0020 0128 0000 0012 0052 7600'), //Cyprus
6871
array('CZ65 0800 0000 1920 0014 5399'), //Czech Republic
@@ -127,7 +130,7 @@ public function getValidIbans()
127130
array('CV64000300004547069110176'), //Cape Verde
128131
array('FR7630007000110009970004942'), //Central African Republic
129132
array('CG5230011000202151234567890'), //Congo
130-
array('CR0515202001026284066'), //Costa Rica
133+
array('CR05015202001026284066'), //Costa Rica
131134
array('DO28BAGR00000001212453611324'), //Dominican Republic
132135
array('GT82TRAJ01020000001210029690'), //Guatemala
133136
array('IR580540105180021273113007'), //Iran
@@ -178,6 +181,10 @@ public function getIbansWithInvalidFormat()
178181
array('BA39 1290 0794 0102 8494 4'), //Bosnia and Herzegovina
179182
array('BG80 BNBG 9661 1020 3456 7'), //Bulgaria
180183
array('BG80 B2BG 9661 1020 3456 78'), //Bulgaria
184+
array('BY 13 NBRB 3600 900000002Z00AB001'), //Belarus
185+
array('BY 13 NBRB 3600 900000002Z00AB0'), //Belarus
186+
array('BYRO NBRB 3600 900000002Z00AB0'), //Belarus
187+
array('BY 13 3600 NBRB 900000002Z00AB05'), //Belarus
181188
array('HR12 1001 0051 8630 0016 01'), //Croatia
182189
array('CY17 0020 0128 0000 0012 0052 7600 1'), //Cyprus
183190
array('CZ65 0800 0000 1920 0014 5399 1'), //Czech Republic
@@ -241,6 +248,7 @@ public function getIbansWithInvalidFormat()
241248
array('FR76300070001100099700049421'), //Central African Republic
242249
array('CG52300110002021512345678901'), //Congo
243250
array('CR05152020010262840661'), //Costa Rica
251+
array('CR0515202001026284066'), //Costa Rica
244252
array('DO28BAGR000000012124536113241'), //Dominican Republic
245253
array('GT82TRAJ010200000012100296901'), //Guatemala
246254
array('IR5805401051800212731130071'), //Iran
@@ -288,6 +296,7 @@ public function getIbansWithValidFormatButIncorrectChecksum()
288296
array('BE62 5100 0754 7062'), //Belgium
289297
array('BA39 1290 0794 0102 8495'), //Bosnia and Herzegovina
290298
array('BG80 BNBG 9661 1020 3456 79'), //Bulgaria
299+
array('BY90 NBRB 3600 900000002Z00AB00'), //Belarus
291300
array('HR12 1001 0051 8630 0016 1'), //Croatia
292301
array('CY17 0020 0128 0000 0012 0052 7601'), //Cyprus
293302
array('CZ65 0800 0000 1920 0014 5398'), //Czech Republic
@@ -350,7 +359,7 @@ public function getIbansWithValidFormatButIncorrectChecksum()
350359
array('CV64000300004547069110177'), //Cape Verde
351360
array('FR7630007000110009970004943'), //Central African Republic
352361
array('CG5230011000202151234567891'), //Congo
353-
array('CR0515202001026284067'), //Costa Rica
362+
array('CR96042332432534543564'), //Costa Rica
354363
array('DO28BAGR00000001212453611325'), //Dominican Republic
355364
array('GT82TRAJ01020000001210029691'), //Guatemala
356365
array('IR580540105180021273113008'), //Iran

0 commit comments

Comments
 (0)