merged branch richardmiller/validation_path_upgrade (PR #3874)
Commits -------6433ca0
Removed duplicated content60d9aff
Added info on changes to setting validation subpath to UPGRADE-2.1.md Discussion ---------- Added info on changes to setting validation subpath to UPGRADE-2.1.md As per GH-3424 --------------------------------------------------------------------------- by stof at 2012-04-11T11:05:00Z you duplicated it --------------------------------------------------------------------------- by richardmiller at 2012-04-11T11:07:17Z I've closed the other one - there was a mess with the commits and an unnecessary merge. --------------------------------------------------------------------------- by stof at 2012-04-11T11:30:00Z @richardmiller I'm talking about the content --------------------------------------------------------------------------- by richardmiller at 2012-04-11T11:35:40Z @stof, ah sorry misunderstood, one of those days it seems :) --------------------------------------------------------------------------- by stof at 2012-04-11T11:42:21Z I should have commented inline to make it more clear
This commit is contained in:
commit
3d6575e152
@ -1,4 +1,4 @@
|
|||||||
UPGRADE FROM 2.0 to 2.1
|
UPGRADE FROM 2.0 to 2.1
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
### General
|
### General
|
||||||
@ -252,6 +252,35 @@ UPGRADE FROM 2.0 to 2.1
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
* The method `setPropertyPath()` in the ExecutionContext class
|
||||||
|
was removed.
|
||||||
|
|
||||||
|
You should use the `addViolationAtSubPath()` method on the
|
||||||
|
`ExecutionContext` object instead.
|
||||||
|
|
||||||
|
Before:
|
||||||
|
|
||||||
|
```
|
||||||
|
public function isPropertyValid(ExecutionContext $context)
|
||||||
|
{
|
||||||
|
// ...
|
||||||
|
$propertyPath = $context->getPropertyPath() . '.property';
|
||||||
|
$context->setPropertyPath($propertyPath);
|
||||||
|
$context->addViolation('Error Message', array(), null);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
After:
|
||||||
|
|
||||||
|
```
|
||||||
|
public function isPropertyValid(ExecutionContext $context)
|
||||||
|
{
|
||||||
|
// ...
|
||||||
|
$context->addViolationAtSubPath('property', 'Error Message', array(), null);
|
||||||
|
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
* The options passed to the `getParent()` method of form types no longer
|
* The options passed to the `getParent()` method of form types no longer
|
||||||
contain default options.
|
contain default options.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user