Skip to content

Commit fd79ac2

Browse files
Merge branch '4.3' into 4.4
* 4.3: fix merge fix merge
2 parents 8239402 + 173b483 commit fd79ac2

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

ConstraintViolation.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,20 @@ class ConstraintViolation implements ConstraintViolationInterface
3232
/**
3333
* Creates a new constraint violation.
3434
*
35-
* @param string $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
35+
* @param string|object $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
3838
* raw violation message
39-
* @param mixed $root The value originally passed to the
39+
* @param mixed $root The value originally passed to the
4040
* validator
41-
* @param string $propertyPath The property path from the root
41+
* @param string $propertyPath The property path from the root
4242
* value to the invalid value
43-
* @param mixed $invalidValue The invalid value that caused this
43+
* @param mixed $invalidValue The invalid value that caused this
4444
* violation
45-
* @param int|null $plural The number for determining the plural
45+
* @param int|null $plural The number for determining the plural
4646
* form when translating the message
47-
* @param string|null $code The error code of the violation
48-
* @param mixed $cause The cause of the violation
47+
* @param string|null $code The error code of the violation
48+
* @param mixed $cause The cause of the violation
4949
*/
5050
public function __construct($message, ?string $messageTemplate, array $parameters, $root, ?string $propertyPath, $invalidValue, int $plural = null, $code = null, Constraint $constraint = null, $cause = null)
5151
{

ConstraintViolationInterface.php

Lines 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 as a string or a stringable object
39+
* @return string|object The violation message as a string or a stringable object
4040
*/
4141
public function getMessage();
4242

Context/ExecutionContextInterface.php

Lines 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 as a string or a stringable object
68-
* @param array $params The parameters substituted in the error message
67+
* @param string|object $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 as a string or a stringable object
85-
* @param array $parameters The parameters substituted in the error message
84+
* @param string|object $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
*/

Tests/ConstraintViolationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function testMessageCanBeStringableObject()
128128
toString
129129
EOF;
130130
$this->assertSame($expected, (string) $violation);
131-
$this->assertSame((string) $message, $violation->getMessage());
131+
$this->assertSame($message, $violation->getMessage());
132132
}
133133

134134
public function testMessageCannotBeArray()

Violation/ConstraintViolationBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class ConstraintViolationBuilder implements ConstraintViolationBuilderInterface
4545
private $cause;
4646

4747
/**
48-
* @param string $message The error message as a string or a stringable object
48+
* @param string|object $message The error message as a string or a stringable object
4949
* @param TranslatorInterface $translator
5050
*/
5151
public function __construct(ConstraintViolationList $violations, Constraint $constraint, $message, array $parameters, $root, string $propertyPath, $invalidValue, $translator, string $translationDomain = null)

0 commit comments

Comments
 (0)