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

Commit cbb9d01

Browse filesBrowse files
minor #36057 [Validator] clarify stringable type annotations (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [Validator] clarify stringable type annotations | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Commits ------- 0ee97f2 [Validator] clarify stringable type annotations
2 parents f6f19e6 + 0ee97f2 commit cbb9d01
Copy full SHA for cbb9d01

3 files changed

+21-21Lines changed: 21 additions & 21 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/Symfony/Component/Validator/ConstraintViolation.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/ConstraintViolation.php
+16-16Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@ class ConstraintViolation implements ConstraintViolationInterface
3232
/**
3333
* Creates a new constraint violation.
3434
*
35-
* @param string $message The violation message
36-
* @param string $messageTemplate The raw violation message
37-
* @param array $parameters The parameters to substitute in the
38-
* raw violation message
39-
* @param mixed $root The value originally passed to the
40-
* validator
41-
* @param string $propertyPath The property path from the root
42-
* value to the invalid value
43-
* @param mixed $invalidValue The invalid value that caused this
44-
* violation
45-
* @param int|null $plural The number for determining the plural
46-
* form when translating the message
47-
* @param mixed $code The error code of the violation
48-
* @param Constraint|null $constraint The constraint whose validation
49-
* caused the violation
50-
* @param mixed $cause The cause of the violation
35+
* @param string|\Stringable $message The violation message as a string or a stringable object
36+
* @param string $messageTemplate The raw violation message
37+
* @param array $parameters The parameters to substitute in the
38+
* raw violation message
39+
* @param mixed $root The value originally passed to the
40+
* validator
41+
* @param string $propertyPath The property path from the root
42+
* value to the invalid value
43+
* @param mixed $invalidValue The invalid value that caused this
44+
* violation
45+
* @param int|null $plural The number for determining the plural
46+
* form when translating the message
47+
* @param mixed $code The error code of the violation
48+
* @param Constraint|null $constraint The constraint whose validation
49+
* caused the violation
50+
* @param mixed $cause The cause of the violation
5151
*/
5252
public function __construct($message, $messageTemplate, array $parameters, $root, $propertyPath, $invalidValue, $plural = null, $code = null, Constraint $constraint = null, $cause = null)
5353
{
Collapse file

‎src/Symfony/Component/Validator/ConstraintViolationInterface.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/ConstraintViolationInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ interface ConstraintViolationInterface
3636
/**
3737
* Returns the violation message.
3838
*
39-
* @return string The violation message
39+
* @return string|\Stringable The violation message as a string or a stringable object
4040
*/
4141
public function getMessage();
4242

Collapse file

‎src/Symfony/Component/Validator/Context/ExecutionContextInterface.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Context/ExecutionContextInterface.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ interface ExecutionContextInterface
6464
/**
6565
* Adds a violation at the current node of the validation graph.
6666
*
67-
* @param string $message The error message
68-
* @param array $params The parameters substituted in the error message
67+
* @param string|\Stringable $message The error message as a string or a stringable object
68+
* @param array $params The parameters substituted in the error message
6969
*/
7070
public function addViolation($message, array $params = []);
7171

@@ -81,8 +81,8 @@ public function addViolation($message, array $params = []);
8181
* ->setTranslationDomain('number_validation')
8282
* ->addViolation();
8383
*
84-
* @param string $message The error message
85-
* @param array $parameters The parameters substituted in the error message
84+
* @param string|\Stringable $message The error message as a string or a stringable object
85+
* @param array $parameters The parameters substituted in the error message
8686
*
8787
* @return ConstraintViolationBuilderInterface The violation builder
8888
*/

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.