Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Validator] Fixed string conversion in constraint violations #10687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 30, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Validator] Fixed CS
  • Loading branch information
webmozart committed Jul 24, 2014
commit 71897d7e3591d4664204da17f50c8587ccd65582
8 changes: 4 additions & 4 deletions 8 src/Symfony/Component/Validator/ConstraintValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ protected function valueToType($value)
/**
* Returns a string representation of the value.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some more explanations about when/why/how this is ever called? Something along the lines of:

"This method is used when a constraint error message contains the {{ value }} placeholder. By default, Symfony never includes it, but the developer can override those error messages. It's up to the developer to make sure it actually makes sense to include such string representation of submitted values in error messages."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

*
* @param mixed $value
* @param Boolean $formatDates
* @param mixed $value
* @param bool $formatDates
*
* @return string
*/
Expand Down Expand Up @@ -100,8 +100,8 @@ protected function valueToString($value, $formatDates = false)
/**
* Returns a string representation of a list of values.
*
* @param array $values
* @param Boolean $formatDates
* @param array $values
* @param bool $formatDates
*
* @return string
*/
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.