Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Validator] ensure the proper context for nested validations#20664
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
xabbuh commentedNov 28, 2016
| Q | A |
|---|---|
| Branch? | 2.7 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #14639,#20368 |
| License | MIT |
| Doc PR | n/a |
HeahDude commentedNov 28, 2016
A necessary feature since 2.7 is LTS and this bug's really tricky |
| $previousGroup =$this->context->getGroup(); | ||
| $previousConstraint =null; | ||
| if ($this->contextinstanceof ExecutionContext ||method_exists($this->context,'getConstraint')) { |
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.
Why not justif (method_exists($this->context, 'getConstraint')) ?
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.
I did not test it, but theinstanceof check should be faster and should be true most of the time.
fabpot commentedNov 29, 2016
Thank you@xabbuh. |
…ns (xabbuh)This PR was merged into the 2.7 branch.Discussion----------[Validator] ensure the proper context for nested validations| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#14639,#20368| License | MIT| Doc PR | n/aCommits-------56c8ff8 ensure the proper context for nested validations