8000 Added info on changes to setting validation subpath to UPGRADE-2.1.md by richardmiller-zz · Pull Request #3874 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Added info on changes to setting validation subpath to UPGRADE-2.1.md #3874

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

Merged
merged 2 commits into from
Apr 11, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion UPGRADE-2.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
UPGRADE FROM 2.0 to 2.1
UPGRADE FROM 2.0 to 2.1
=======================

### General
Expand Down Expand Up @@ -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
contain default options.

Expand Down
0