From 2aec5938a3590ba69a11bab6f2ec8d8ba438e3a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Masforn=C3=A9?= Date: Mon, 6 Apr 2020 21:52:50 +0200 Subject: [PATCH 1/4] Feature #36362 add Isin validator constraint Feature #36362 typo Fix PR feedbacks Fix coding standard ticket 36362 fix PR feedbacks Update src/Symfony/Component/Validator/Constraints/IsinValidator.php Co-Authored-By: Yannis Foucher <33806646+YaFou@users.noreply.github.com> --- CHANGELOG-5.0.md | 2 +- src/Symfony/Component/Validator/CHANGELOG.md | 1 + .../Component/Validator/Constraints/Isin.php | 38 +++ .../Validator/Constraints/IsinValidator.php | 130 +++++++++++ .../Resources/translations/validators.en.xlf | 4 + .../Resources/translations/validators.fr.xlf | 4 + .../Tests/Constraints/IsinValidatorTest.php | 221 ++++++++++++++++++ 7 files changed, 399 insertions(+), 1 deletion(-) create mode 100644 src/Symfony/Component/Validator/Constraints/Isin.php create mode 100644 src/Symfony/Component/Validator/Constraints/IsinValidator.php create mode 100644 src/Symfony/Component/Validator/Tests/Constraints/IsinValidatorTest.php diff --git a/CHANGELOG-5.0.md b/CHANGELOG-5.0.md index dee55df56ba2a..d589c80d1cb1d 100644 --- a/CHANGELOG-5.0.md +++ b/CHANGELOG-5.0.md @@ -266,7 +266,7 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c * bug #34802 [Security] Check UserInterface::getPassword is not null before calling needsRehash (dbrekelmans) * bug #34788 [SecurityBundle] Properly escape regex in AddSessionDomainConstraintPass (fancyweb) * bug #34859 [SecurityBundle] Fix TokenStorage::reset not called in stateless firewall (jderusse) - * bug #34827 [HttpFoundation] get currently session.gc_maxlifetime if ttl doesnt exists (rafaeltovar) + * bug #34827 [HttpFoundation] get currently session.gc_maxlifetime if ttl doesn't exists (rafaeltovar) * bug #34755 [FrameworkBundle] resolve service locators in `debug:*` commands (nicolas-grekas) * bug #34832 [Validator] Allow underscore character "_" in URL username and password (romainneutron) * bug #34765 [DoctrineBridge] Removed QueryBuilder type hint in getLoader() (HeahDude) diff --git a/src/Symfony/Component/Validator/CHANGELOG.md b/src/Symfony/Component/Validator/CHANGELOG.md index d2eb00fc42c5a..4180399847c5f 100644 --- a/src/Symfony/Component/Validator/CHANGELOG.md +++ b/src/Symfony/Component/Validator/CHANGELOG.md @@ -9,6 +9,7 @@ CHANGELOG * allow to define a reusable set of constraints by extending the `Compound` constraint * added `Sequentially` constraint, to sequentially validate a set of constraints (any violation raised will prevent further validation of the nested constraints) * added the `divisibleBy` option to the `Count` constraint + * added `isin` constraints 5.0.0 ----- diff --git a/src/Symfony/Component/Validator/Constraints/Isin.php b/src/Symfony/Component/Validator/Constraints/Isin.php new file mode 100644 index 0000000000000..586ea829d2d5f --- /dev/null +++ b/src/Symfony/Component/Validator/Constraints/Isin.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Laurent Masforné + */ +class Isin extends Constraint +{ + const VALIDATION_LENGTH = 12; + const VALIDATION_PATTERN = '/[A-Z]{2}[A-Z0-9]{9}[0-9]{1}/'; + + const INVALID_LENGTH_ERROR = '88738dfc-9ed5-ba1e-aebe-402a2a9bf58e'; + const INVALID_PATTERN_ERROR = '3d08ce0-ded9-a93d-9216-17ac21265b65e'; + const INVALID_CHECKSUM_ERROR = '32089b-0ee1-93ba-399e-aa232e62f2d29d'; + + protected static $errorNames = [ + self::INVALID_LENGTH_ERROR => 'INVALID_LENGTH_ERROR', + self::INVALID_PATTERN_ERROR => 'INVALID_PATTERN_ERROR', + self::INVALID_CHECKSUM_ERROR => 'INVALID_CHECKSUM_ERROR', + ]; + + public $message = 'This is not a valid International Securities Identification Number (ISIN).'; +} diff --git a/src/Symfony/Component/Validator/Constraints/IsinValidator.php b/src/Symfony/Component/Validator/Constraints/IsinValidator.php new file mode 100644 index 0000000000000..21c8d9b3b73bd --- /dev/null +++ b/src/Symfony/Component/Validator/Constraints/IsinValidator.php @@ -0,0 +1,130 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; +use Symfony\Component\Validator\Exception\UnexpectedValueException; + +/** + * @author Laurent Masforné + * + * @see https://en.wikipedia.org/wiki/International_Securities_Identification_Number + */ +class IsinValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Isin) { + throw new UnexpectedTypeException($constraint, Isin::class); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedValueException($value, 'string'); + } + + $value = strtoupper($value); + $canonicalize = str_replace(' ', '', $value); + + if (Isin::VALIDATION_LENGTH !== \strlen($canonicalize)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Isin::INVALID_LENGTH_ERROR) + ->addViolation(); + + return; + } + + if (!preg_match(Isin::VALIDATION_PATTERN, $value)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Isin::INVALID_PATTERN_ERROR) + ->addViolation(); + + return; + } + + if (!$this->isCorrectChecksum($value)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Isin::INVALID_CHECKSUM_ERROR) + ->addViolation(); + + return; + } + + return $value; + } + + private function isCorrectChecksum($input) + { + $characters = str_split($input); + foreach ($characters as $i => $char) { + $characters[$i] = \intval($char, 36); + } + $checkDigit = array_pop($characters); + $number = implode('', $characters); + $expectedCheckDigit = $this->getCheckDigit($number); + + return $checkDigit === $expectedCheckDigit; + } + + /** + * This method performs the luhn algorithm + * to obtain a check digit. + */ + private function getCheckDigit($input) + { + // first split up the string + $numbers = str_split($input); + + // calculate the positional value. + // when there is an even number of digits the second group will be multiplied, so p starts on 0 + // when there is an odd number of digits the first group will be multiplied, so p starts on 1 + $p = \count($numbers) % 2; + // run through each number + foreach ($numbers as $i => $num) { + $num = (int) $num; + // every positional number needs to be multiplied by 2 + if ($p % 2) { + $num = $num * 2; + // if the result was more than 9 + // add the individual digits + $num = array_sum(str_split($num)); + } + $numbers[$i] = $num; + ++$p; + } + + // get the total value of all the digits + $sum = array_sum($numbers); + + // get the remainder when dividing by 10 + $mod = $sum % 10; + + // subtract from 10 + $rem = 10 - $mod; + + // mod from 10 to catch if the result was 0 + $digit = $rem % 10; + + return $digit; + } +} diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf index 674ccf5c30ea6..82637f8cefaf5 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf @@ -382,6 +382,10 @@ Each element of this collection should satisfy its own set of constraints. Each element of this collection should satisfy its own set of constraints. + + This is not a valid International Securities Identification Number (ISIN). + This is not a valid International Securities Identification Number (ISIN). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf index c44ade69e0713..b55e2a5edac36 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf @@ -382,6 +382,10 @@ Each element of this collection should satisfy its own set of constraints. Chaque élément de cette collection doit satisfaire à son propre jeu de contraintes. + + This is not a valid International Securities Identification Number (ISIN). + Ce n'est pas un code international de sécurité valide (ISIN). + diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IsinValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IsinValidatorTest.php new file mode 100644 index 0000000000000..162d25526d2cb --- /dev/null +++ b/src/Symfony/Component/Validator/Tests/Constraints/IsinValidatorTest.php @@ -0,0 +1,221 @@ +validator->validate(null, new Isin()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Isin()); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getValidIsin + */ + public function testValidIsin($isin) + { + $this->validator->validate($isin, new Isin()); + $this->assertNoViolation(); + } + + public function getValidIsin() + { + return [ + ['XS2125535901'], // Goldman Sachs International MTN HKD HKD 126d + ['XS2125543244'], // Goldman Sachs International MTN USD USD 1y 4d + ['DE000HZ8VA77'], // UniCredit Bank AG Bond EUR EUR 94d + ['CH0528261156'], // Leonteq Securities AG [Guernsey] Bond GBP GBP 3y + ['XS2075660048'], // Credit Suisse International [Milan] Bond HKD HKD 31d + ['XS2076647408'], // Credit Suisse International [Milan] Bond USD USD 125d + ['XS2076680102'], // Credit Suisse International [Milan] Bond USD USD 187d + ['XS2076709364'], // Credit Suisse International [Milan] Bond HKD HKD 96d + ['XS2076921589'], // Credit Suisse International [Milan] Bond USD USD 125d + ['XS2154346642'], // Sanctuary Capital Plc Bond GBP GBP 30y + ['XS2155328524'], // Toyota Financial Services (UK) PLC CP GBP GBP 3d + ['XS2155359081'], // HSBC Bank plc MTN USD USD 2y 2d + ['XS2155366375'], // RWE AG CP EUR EUR 10d + ['XS2155487593'], // Tasmanian Public Finance Corporation CP USD USD 30d + ['XS2155665792'], // Agricultural Bank of China Ltd [Macao] CD USD USD 91d + ['XS2155673119'], // Orbian Financial Services XVI LLC CP GBP GBP 357d + ['XS2155687507'], // Orbian Financial Services III, LLC CP USD USD 281d + ['XS2155798163'], // Toronto-Dominion Bank MTN USD USD 1y 134d + ['XS2064679835'], // Goldman Sachs International MTN HKD HKD 129d + ['XS1336064321'], // Morgan Stanley and Co. LLC MTN JPY JPY 10y 1d + ['XS2087039439'], // BNP Paribas Issuance B.V. MTN GBP GBP 4y 358d + ['XS2088949438'], // BNP Paribas SA [Hong Kong] MTN HKD HKD 190d + ['XS2139137512'], // UBS AG [London] Bond USD USD 1y 3d + ['XS2139413566'], // UBS AG [London] Bond AUD AUD 1y + ['XS2112710350'], // SG Issuer S.A. MTN JPY JPY 28d + ['XS2112741744'], // SG Issuer S.A. MTN AUD AUD 1y 4d + ['XS2123606944'], // JP Morgan Structured Products BV MTN HKD HKD 30d + ['XS2125535810'], // Goldman Sachs International MTN HKD HKD 30d + ['XS2125543160'], // Goldman Sachs International MTN USD USD 187d + ['XS2125792973'], // Goldman Sachs International MTN USD USD 95d + ['CH0528261099'], // Leonteq Securities AG [Guernsey] Bond EUR EUR 3y + ['XS2075477278'], // Lagoon Park Capital SA MTN GBP GBP 152d + ['XS2076647150'], // Credit Suisse International [Milan] Bond USD USD 63d + ['XS2076679518'], // Credit Suisse International [Milan] Bond USD USD 34d + ['XS2076708044'], // Credit Suisse International [Milan] Bond AUD AUD 279d + ['XS2076920003'], // Credit Suisse International [Milan] Bond JPY JPY 1y 1d + ['XS2151619868'], // Neijiang Investment Holding Group Co. Ltd Bond USD USD 3y + ['XS2155328441'], // Chesham Finance Ltd CP EUR EUR 3d + ['XS2155358943'], // CSI Financial Products Limited MTN USD USD 364d + ['XS2155366292'], // China Construction Bank Corporation [Singapore] CD USD USD 91d + ['XS2155487247'], // Toyota Motor Finance (Netherlands) BV CP EUR EUR 30d + ['XS2155664472'], // Mitsubishi Corporation Finance Plc CP EUR EUR 14d + ['XS2155673036'], // Orbian Financial Services VI Ltd CP USD USD 87d + ['XS2155687416'], // Orbian Financial Services III, LLC CP USD USD 267d + ['XS2155798080'], // LMA SA (Liquidites de Marche SA) CP GBP GBP 7d + ['XS2064677466'], // Goldman Sachs International MTN USD USD 31d + ['XS1336064248'], // Morgan Stanley and Co. LLC MTN JPY JPY 10y 1d + ['XS2087039355'], // BNP Paribas Issuance B.V. MTN USD USD 3y + ['XS2088949354'], // BNP Paribas SA [Hong Kong] MTN HKD HKD 29d + ['XS2139136977'], // UBS AG [London] Bond USD USD 29d + ['XS2139399476'], // UBS AG [London] Bond USD USD 2y + ['XS2112709931'], // SG Issuer S.A. MTN JPY JPY 1y 3d + ['XS2112718767'], // SG Issuer S.A. Note EUR EUR 1y 364d + ['XS2123606860'], // JP Morgan Structured Products BV MTN HKD HKD 30d + ['XS2125535653'], // Goldman Sachs International MTN HKD HKD 31d + ['XS2125543087'], // Goldman Sachs International MTN USD USD 63d + ['XS2125792890'], // Goldman Sachs International MTN JPY JPY 33d + ['CH0528261081'], // Leonteq Securities AG [Guernsey] Bond USD USD 3y + ['XS2073420338'], // Lagoon Park Capital SA MTN USD USD 34d + ['XS2076646855'], // Credit Suisse International [Milan] Bond USD USD 95d + ['XS2076679435'], // Credit Suisse International [Milan] Bond USD USD 125d + ['XS2076707822'], // Credit Suisse International [Milan] Bond HKD HKD 98d + ['XS2076919765'], // Credit Suisse International [Milan] Bond USD USD 187d + ['XS2151069775'], // Lloyds Bank Corporate Markets Plc MTN EUR EUR 3y 364d + ['XS2155323053'], // Halkin Finance Plc CP EUR EUR 3d + ['XS2155358869'], // Agence Centrale de Organismes de Securite Sociale CP USD USD 91d + ['XS2155366029'], // Itau BBA International Plc MTN USD USD 364d + ['XS2155487163'], // LMA SA (Liquidites de Marche SA) CP EUR EUR 3d + ['XS2155629210'], // HSBC Bank plc MTN USD USD 91d + ['XS2155672905'], // Orbian Financial Services XXV Ltd CP GBP GBP 101d + ['XS2155687333'], // Orbian Financial Services III, LLC CP USD USD 207d + ['XS2155707628'], // Korea Development Bank MTN USD USD 3y + ['XS2064677110'], // Goldman Sachs International MTN USD USD 31d + ['XS1336064164'], // Morgan Stanley and Co. LLC MTN JPY JPY 10y 1d + ['XS2087039272'], // BNP Paribas Issuance B.V. MTN USD USD 1y 10d + ['XS2088949271'], // BNP Paribas SA [Hong Kong] MTN HKD HKD 30d + ['XS2139132711'], // UBS AG [London] Bond AUD AUD 190d + ['XS2139390418'], // UBS AG [London] Bond USD USD 29d + ['XS2112709691'], // SG Issuer S.A. MTN HKD HKD 313d + ['XS2112717876'], // SG Issuer S.A. Note EUR EUR 1y 364d + ['XS2123606605'], // JP Morgan Structured Products BV MTN JPY JPY 2y 3d + ['XS2125535497'], // Goldman Sachs International MTN HKD HKD 95d + ['XS2125542949'], // Goldman Sachs International MTN USD USD 95d + ['XS2125674007'], // Goldman Sachs International MTN USD USD 15y + ['CH0524351191'], // Leonteq Securities AG [Guernsey] Bond USD USD 3y + ['XS2073290707'], // Marex Financial Note USD USD 84d + ['XS2076646772'], // Credit Suisse International [Milan] Bond HKD HKD 279d + ['XS2076678114'], // Credit Suisse International [Milan] Bond AUD AUD 185d + ['XS2076706188'], // Credit Suisse International [Milan] Bond USD USD 187d + ['XS2076919179'], // Credit Suisse International [Milan] Bond SGD SGD 187d + ['XS2147109438'], // Citigroup Global Markets Funding Luxembourg SCA MTN USD USD 61d + ['XS2155322675'], // Industrial and Commercial Bank of China Ltd CD USD USD 91d + ['XS2155358513'], // BBVA Global Markets B.V. MTN USD USD 4y 361d + ['XS2155365997'], // Itau BBA International Plc MTN USD USD 1y 120d + ['XS2155486942'], // Grenke Finance Plc MTN EUR EUR 5y 91d + ['XS2155629137'], // HSBC Bank plc MTN SGD SGD 91d + ['XS2155672814'], // OP Corporate Bank plc CP GBP GBP 93d + ['XS2155687259'], // Orbian Financial Services III, LLC CP USD USD 206d + ['XS2155696672'], // Sheffield Receivables Company LLC CP EUR EUR 7d//Vatican City State + ]; + } + + /** + * @dataProvider getIsinWithInvalidLenghFormat + */ + public function testIsinWithInvalidFormat($isin) + { + $this->assertViolationRaised($isin, Isin::INVALID_LENGTH_ERROR); + } + + public function getIsinWithInvalidLenghFormat() + { + return [ + ['X'], + ['XS'], + ['XS2'], + ['XS21'], + ['XS215'], + ['XS2155'], + ['XS21556'], + ['XS215569'], + ['XS2155696'], + ['XS21556966'], + ['XS215569667'], + ]; + } + + /** + * @dataProvider getIsinWithInvalidPattern + */ + public function testIsinWithInvalidPattern($isin) + { + $this->assertViolationRaised($isin, Isin::INVALID_PATTERN_ERROR); + } + + public function getIsinWithInvalidPattern() + { + return [ + ['X12155696679'], + ['123456789101'], + ['XS215569667E'], + ['XS215E69667A'], + ]; + } + + /** + * @dataProvider getIsinWithValidFormatButIncorrectChecksum + */ + public function testIsinWithValidFormatButIncorrectChecksum($isin) + { + $this->assertViolationRaised($isin, Isin::INVALID_CHECKSUM_ERROR); + } + + public function getIsinWithValidFormatButIncorrectChecksum() + { + return [ + ['XS2112212144'], + ['DE013228VA77'], + ['CH0512361156'], + ['XS2125660123'], + ['XS2012587408'], + ['XS2012380102'], + ['XS2012239364'], + ]; + } + + private function assertViolationRaised($isin, $code) + { + $constraint = new Isin([ + 'message' => 'myMessage', + ]); + + $this->validator->validate($isin, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$isin.'"') + ->setCode($code) + ->assertRaised(); + } +} From 53583e09bd8ba5a18fbb655ab0723fcf406bedf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Masforn=C3=A9?= Date: Fri, 24 Apr 2020 14:55:19 +0200 Subject: [PATCH 2/4] ticket 36362 fix PR feedbacks --- src/Symfony/Component/Validator/Constraints/IsinValidator.php | 3 +-- .../Validator/Resources/translations/validators.en.xlf | 4 ++-- .../Validator/Resources/translations/validators.fr.xlf | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Component/Validator/Constraints/IsinValidator.php b/src/Symfony/Component/Validator/Constraints/IsinValidator.php index 21c8d9b3b73bd..955393c6b7bfe 100644 --- a/src/Symfony/Component/Validator/Constraints/IsinValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IsinValidator.php @@ -41,9 +41,8 @@ public function validate($value, Constraint $constraint) } $value = strtoupper($value); - $canonicalize = str_replace(' ', '', $value); - if (Isin::VALIDATION_LENGTH !== \strlen($canonicalize)) { + if (Isin::VALIDATION_LENGTH !== \strlen($value)) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Isin::INVALID_LENGTH_ERROR) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf index 82637f8cefaf5..ecc73e48aa1ef 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf @@ -383,8 +383,8 @@ Each element of this collection should satisfy its own set of constraints. - This is not a valid International Securities Identification Number (ISIN). - This is not a valid International Securities Identification Number (ISIN). + This value is not a valid International Securities Identification Number (ISIN). + This value is not a valid International Securities Identification Number (ISIN). diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf index b55e2a5edac36..26b0c4e630fb0 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf @@ -383,7 +383,7 @@ Chaque élément de cette collection doit satisfaire à son propre jeu de contraintes. - This is not a valid International Securities Identification Number (ISIN). + This value is not a valid International Securities Identification Number (ISIN). Ce n'est pas un code international de sécurité valide (ISIN). From 02e86f61bbd76727cde5ebdabb685437c4d95c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Masforn=C3=A9?= Date: Sat, 25 Apr 2020 19:07:46 +0200 Subject: [PATCH 3/4] ticket 36362 fix PR feedbacks and revert changelog --- CHANGELOG-5.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG-5.0.md b/CHANGELOG-5.0.md index d589c80d1cb1d..dee55df56ba2a 100644 --- a/CHANGELOG-5.0.md +++ b/CHANGELOG-5.0.md @@ -266,7 +266,7 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c * bug #34802 [Security] Check UserInterface::getPassword is not null before calling needsRehash (dbrekelmans) * bug #34788 [SecurityBundle] Properly escape regex in AddSessionDomainConstraintPass (fancyweb) * bug #34859 [SecurityBundle] Fix TokenStorage::reset not called in stateless firewall (jderusse) - * bug #34827 [HttpFoundation] get currently session.gc_maxlifetime if ttl doesn't exists (rafaeltovar) + * bug #34827 [HttpFoundation] get currently session.gc_maxlifetime if ttl doesnt exists (rafaeltovar) * bug #34755 [FrameworkBundle] resolve service locators in `debug:*` commands (nicolas-grekas) * bug #34832 [Validator] Allow underscore character "_" in URL username and password (romainneutron) * bug #34765 [DoctrineBridge] Removed QueryBuilder type hint in getLoader() (HeahDude) From 5ec9f4277b041dc56d618861c431bad3f709d3bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Masforn=C3=A9?= Date: Mon, 25 May 2020 10:56:42 +0200 Subject: [PATCH 4/4] Update src/Symfony/Component/Validator/CHANGELOG.md Co-authored-by: Oskar Stark --- src/Symfony/Component/Validator/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/CHANGELOG.md b/src/Symfony/Component/Validator/CHANGELOG.md index 4180399847c5f..c3aa550fcb93b 100644 --- a/src/Symfony/Component/Validator/CHANGELOG.md +++ b/src/Symfony/Component/Validator/CHANGELOG.md @@ -9,7 +9,7 @@ CHANGELOG * allow to define a reusable set of constraints by extending the `Compound` constraint * added `Sequentially` constraint, to sequentially validate a set of constraints (any violation raised will prevent further validation of the nested constraints) * added the `divisibleBy` option to the `Count` constraint - * added `isin` constraints + * added `Isin` constraint 5.0.0 -----