Skip to content

Commit

Permalink
minor #35877 [Validator][ConstraintValidator] Update wrong PRETTY_DAT…
Browse files Browse the repository at this point in the history
…E doc (fancyweb)

This PR was merged into the 3.4 branch.

Discussion
----------

[Validator][ConstraintValidator] Update wrong PRETTY_DATE doc

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

That is really minor but the current doc is not up to date with the real behavior.

Commits
-------

491fc5c [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc
  • Loading branch information
nicolas-grekas committed Feb 27, 2020
2 parents 6f95125 + 491fc5c commit dd8f580
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Symfony/Component/Validator/ConstraintValidator.php
Expand Up @@ -21,8 +21,8 @@
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;

Expand Down Expand Up @@ -69,7 +69,8 @@ protected function formatTypeOf($value)
* 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
Expand Down

0 comments on commit dd8f580

Please sign in to comment.