-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Validator] New NodeTraverser implementation #10287
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
Changes from 1 commit
25cdc68
a6ed4ca
a40189c
7e3a41d
b1a9477
1156bde
321d5bb
680f1ee
8ae68c9
c1b1e03
5fbf848
8318286
f6b7288
4ea3ff6
adc1437
499b2bb
405a03b
9b07b0c
297ba4f
09f744b
ee1adad
718601c
feb3d6f
1e81f3b
9c9e715
2c65a28
a3555fb
bc29591
26eafa4
df41974
e440690
e057b19
230f2a7
cf1281f
94583a9
117b1b9
51197f6
08172bf
aeb6822
4161371
76d8c9a
778ec24
6fc6ecd
2936d10
e8fa15b
8558377
dbce5a2
822fe47
186c115
299c2dc
be7f055
9986f03
524a953
9ca61df
01ceeda
79387a7
987313d
93fdff7
886e05e
f61d31e
23534ca
38e26fb
274d4e6
eeed509
5c479d8
eed29d8
50bb84d
be508e0
1622eb3
94ef21e
73c9cc5
2f23d97
029a716
3183aed
90c27bb
166d71a
7bc952d
1b111d0
0946dbe
9b204c9
c5629bb
3dc2b4d
0bfde4a
b1badea
68d8018
ca6a722
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,12 +31,12 @@ class ConstraintViolation implements ConstraintViolationInterface | |
/** | ||
* @var array | ||
*/ | ||
private $messageParameters; | ||
private $parameters; | ||
|
||
/** | ||
* @var integer|null | ||
*/ | ||
private $messagePluralization; | ||
private $plural; | ||
|
||
/** | ||
* @var mixed | ||
|
@@ -61,27 +61,26 @@ class ConstraintViolation implements ConstraintViolationInterface | |
/** | ||
* Creates a new constraint violation. | ||
* | ||
* @param string $message The violation message. | ||
* @param string $messageTemplate The raw violation message. | ||
* @param array $messageParameters The parameters to substitute | ||
* in the raw message. | ||
* @param mixed $root The value originally passed | ||
* to the validator. | ||
* @param string $propertyPath The property path from the | ||
* root value to the invalid | ||
* value. | ||
* @param mixed $invalidValue The invalid value causing the | ||
* violation. | ||
* @param integer|null $messagePluralization The pluralization parameter. | ||
* @param mixed $code The error code of the | ||
* violation, if any. | ||
*/ | ||
public function __construct($message, $messageTemplate, array $messageParameters, $root, $propertyPath, $invalidValue, $messagePluralization = null, $code = null) | ||
* @param string $message The violation message | ||
* @param string $messageTemplate The raw violation message | ||
* @param array $parameters The parameters to substitute in the | ||
* raw violation message | ||
* @param mixed $root The value originally passed to the | ||
* validator | ||
* @param string $propertyPath The property path from the root | ||
* value to the invalid value | ||
* @param mixed $invalidValue The invalid value that caused this | ||
* violation | ||
* @param integer|null $plural The number for determining the plural | ||
* form when translation the message | ||
* @param mixed $code The error code of the violation | ||
*/ | ||
public function __construct($message, $messageTemplate, array $parameters, $root, $propertyPath, $invalidValue, $plural = null, $code = null) | ||
{ | ||
$this->message = $message; | ||
$this->messageTemplate = $messageTemplate; | ||
$this->messageParameters = $messageParameters; | ||
$this->messagePluralization = $messagePluralization; | ||
$this->parameters = $parameters; | ||
$this->plural = $plural; | ||
$this->root = $root; | ||
$this->propertyPath = $propertyPath; | ||
$this->invalidValue = $invalidValue; | ||
|
@@ -130,15 +129,31 @@ public function getMessageTemplate() | |
*/ | ||
public function getMessageParameters() | ||
{ | ||
return $this->messageParameters; | ||
return $this->parameters; | ||
} | ||
|
||
/** | ||
* Alias of {@link getMessageParameters()}. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's the reason for an alias? should the old one not get deprecated if the new one is better named? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @webmozart ^^ ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Tobion Yes, but we can't add the new version to The long versions are going to be removed in Symfony 3.0 when we can change the interface (and move it to the |
||
*/ | ||
public function getParameters() | ||
{ | ||
return $this->parameters; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getMessagePluralization() | ||
{ | ||
return $this->messagePluralization; | ||
return $this->plural; | ||
} | ||
|
||
/** | ||
* Alias of {@link getMessagePluralization()}. | ||
*/ | ||
public function getPlural() | ||
{ | ||
return $this->plural; | ||
} | ||
|
||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
translating