Skip to content

Commit 56f9bae

Browse files
Merge branch '3.3' into 3.4
* 3.3: fix merge fixed wrong description in a phpdoc 19 digits VISA card numbers are valid Add missing @ in phpdoc return statement Don't right trim the deprecation message [HttpKernel] Fixed test name [Debug] prevent infinite loop with faulty exception handlers Add the missing `enabled` session attribute [HttpKernel] Turn bad hosts into 400 instead of 500
2 parents 1082873 + a14ebad commit 56f9bae

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Constraints/CardSchemeValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ class CardSchemeValidator extends ConstraintValidator
7878
'/^5[1-5][0-9]{14}$/',
7979
'/^2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12})$/',
8080
),
81-
// All Visa card numbers start with a 4. New cards have 16 digits. Old cards have 13.
81+
// All Visa card numbers start with a 4 and have a length of 13, 16, or 19 digits.
8282
'VISA' => array(
83-
'/^4([0-9]{12}|[0-9]{15})$/',
83+
'/^4([0-9]{12}|[0-9]{15}|[0-9]{18})$/',
8484
),
8585
);
8686

Tests/Constraints/CardSchemeValidatorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ public function getValidNumbers()
106106
array('VISA', '4111111111111111'),
107107
array('VISA', '4012888888881881'),
108108
array('VISA', '4222222222222'),
109+
array('VISA', '4917610000000000003'),
109110
array(array('AMEX', 'VISA'), '4111111111111111'),
110111
array(array('AMEX', 'VISA'), '378282246310005'),
111112
array(array('JCB', 'MASTERCARD'), '5105105105105100'),

0 commit comments

Comments
 (0)