Skip to content

Commit 2caf6ef

Browse files
Merge branch '3.3' into 3.4
* 3.3: [DI] use assertStringEqualsFile when possible [VarDumper] Adapt to php 7.2 changes [DI] Fix using private services in expressions [Form][TwigBridge] Don't render _method in form_rest() for a child form [Form] Static call TimezoneType::getTimezones Removed references for non existent validator constraints Suggest using quotes instead of Yaml::PARSE_KEYS_AS_STRINGS [DI] Fix test [Cache] Handle unserialization failures for Memcached Remove unused prop + added @deprecated Remove unused mocks/vars [DoctrineBridge][PropertyInfo] Added support for Doctrine Embeddables [Validator] Fix IbanValidator for ukrainian IBANs Router: allow HEAD method to be defined first [WebProfilerBundle] Display trace and context in the logger profiler Fixing a bug where if a core class was autowired, autowiring tried to autowire optional args as if they were required
2 parents 682c458 + d511c27 commit 2caf6ef

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Constraints/IbanValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class IbanValidator extends ConstraintValidator
3333
* a BBAN (Basic Bank Account Number) which has a fixed length per country and,
3434
* included within it, a bank identifier with a fixed position and a fixed length per country
3535
*
36-
* @see http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf
36+
* @see https://www.swift.com/sites/default/files/resources/iban_registry.pdf
3737
*
3838
* @var array
3939
*/
@@ -129,7 +129,7 @@ class IbanValidator extends ConstraintValidator
129129
'TL' => 'TL\d{2}\d{3}\d{14}\d{2}', // Timor-Leste
130130
'TN' => 'TN59\d{2}\d{3}\d{13}\d{2}', // Tunisia
131131
'TR' => 'TR\d{2}\d{5}[\dA-Z]{1}[\dA-Z]{16}', // Turkey
132-
'UA' => 'UA\d{2}[A-Z]{6}[\dA-Z]{19}', // Ukraine
132+
'UA' => 'UA\d{2}\d{6}[\dA-Z]{19}', // Ukraine
133133
'VG' => 'VG\d{2}[A-Z]{4}\d{16}', // Virgin Islands, British
134134
'WF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Wallis and Futuna Islands
135135
'XK' => 'XK\d{2}\d{4}\d{10}\d{2}', // Republic of Kosovo

Tests/Constraints/IbanValidatorTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function getValidIbans()
113113

114114
//Extended country list
115115
//http://www.nordea.com/Our+services/International+products+and+services/Cash+Management/IBAN+countries/908462.html
116-
// http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf
116+
// https://www.swift.com/sites/default/files/resources/iban_registry.pdf
117117
array('AO06000600000100037131174'), //Angola
118118
array('AZ21NABZ00000000137010001944'), //Azerbaijan
119119
array('BH29BMAG1299123456BH00'), //Bahrain
@@ -151,6 +151,7 @@ public function getValidIbans()
151151
array('TL380080012345678910157'), //Timor-Leste
152152
array('TN5914207207100707129648'), //Tunisia
153153
array('TR330006100519786457841326'), //Turkey
154+
array('UA213223130000026007233566001'), //Ukraine
154155
array('AE260211000000230064016'), //United Arab Emirates
155156
);
156157
}
@@ -263,6 +264,7 @@ public function getIbansWithInvalidFormat()
263264
array('TL3800800123456789101571'), //Timor-Leste
264265
array('TN59142072071007071296481'), //Tunisia
265266
array('TR3300061005197864578413261'), //Turkey
267+
array('UA21AAAA1300000260072335660012'), //Ukraine
266268
array('AE2602110000002300640161'), //United Arab Emirates
267269
);
268270
}
@@ -372,6 +374,7 @@ public function getIbansWithValidFormatButIncorrectChecksum()
372374
array('TL380080012345678910158'), //Timor-Leste
373375
array('TN5914207207100707129649'), //Tunisia
374376
array('TR330006100519786457841327'), //Turkey
377+
array('UA213223130000026007233566002'), //Ukraine
375378
array('AE260211000000230064017'), //United Arab Emirates
376379
);
377380
}

0 commit comments

Comments
 (0)