8000 merged branch richardmiller/validation_path_upgrade (PR #3874) · Exercise/symfony@3d6575e · GitHub
[go: up one dir, main page]

Skip to content

Commit 3d6575e

Browse files
committed
merged branch richardmiller/validation_path_upgrade (PR symfony#3874)
Commits ------- 6433ca0 Removed duplicated content 60d9aff 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 symfonyGH-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
2 parents 3c3ec5c + 6433ca0 commit 3d6575e

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

UPGRADE-2.1.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
UPGRADE FROM 2.0 to 2.1
1+
UPGRADE FROM 2.0 to 2.1
22
=======================
33

44
### General
@@ -252,6 +252,35 @@ UPGRADE FROM 2.0 to 2.1
252252
}
253253
```
254254
255+
* The method `setPropertyPath()` in the ExecutionContext class
256+
was removed.
257+
258+
You should use the `addViolationAtSubPath()` method on the
259+
`ExecutionContext` object instead.
260+
261+
Before:
262+
263+
```
264+
public function isPropertyValid(ExecutionContext $context)
265+
{
266+
// ...
267+
$propertyPath = $context->getPropertyPath() . '.property';
268+
$context->setPropertyPath($propertyPath);
269+
$context->addViolation('Error Message', array(), null);
270+
}
271+
```
272+
273+
After:
274+
275+
```
276+
public function isPropertyValid(ExecutionContext $context)
277+
{
278+
// ...
279+
$context->addViolationAtSubPath('property', 'Error Message', array(), null);
280+
281+
}
282+
```
283+
255284
* The options passed to the `getParent()` method of form types no longer
256285
contain default options.
257286

0 commit comments

Comments
 (0)
0