From 491fc5c24d785937c82f5fc8349edbe5155da01f Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Wed, 26 Feb 2020 21:34:36 +0100 Subject: [PATCH] [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc --- src/Symfony/Component/Validator/ConstraintValidator.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Validator/ConstraintValidator.php b/src/Symfony/Component/Validator/ConstraintValidator.php index 458351fe2e..db0ccb60a8 100644 --- a/src/Symfony/Component/Validator/ConstraintValidator.php +++ b/src/Symfony/Component/Validator/ConstraintValidator.php @@ -21,8 +21,8 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; abstract class ConstraintValidator implements ConstraintValidatorInterface { /** - * Whether to format {@link \DateTime} objects as RFC-3339 dates - * ("Y-m-d H:i:s"). + * Whether to format {@link \DateTime} objects, either with the {@link \IntlDateFormatter} + * (if it is available) or as RFC-3339 dates ("Y-m-d H:i:s"). */ const PRETTY_DATE = 1; @@ -69,7 +69,8 @@ abstract class ConstraintValidator implements ConstraintValidatorInterface * in double quotes ("). Objects, arrays and resources are formatted as * "object", "array" and "resource". If the $format bitmask contains * the PRETTY_DATE bit, then {@link \DateTime} objects will be formatted - * as RFC-3339 dates ("Y-m-d H:i:s"). + * with the {@link \IntlDateFormatter}. If it is not available, they will be + * formatted as RFC-3339 dates ("Y-m-d H:i:s"). * * Be careful when passing message parameters to a constraint violation * that (may) contain objects, arrays or resources. These parameters