Skip to content

Conversation

@webmozart
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #5050
License MIT
Doc PR -

This PR adds a getConstraint() method to the ConstraintViolation in order to access the constraint causing the violation.

Related to #7276, #7273 and #9691.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the BC promise, this can must be documented in the UPGRADE-2.6.md file, mustn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and also in the Validator changelog

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both updated.

@webmozart
Copy link
Contributor Author

ping @symfony/deciders

UPGRADE-2.6.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing "the" before constraint?

@stof
Copy link
Member

stof commented Aug 18, 2014

👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cannot be null according to the constructor

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@romainneutron
Copy link
Contributor

I'm 👍 on this one, just address @Tobion comment

@Tobion
Copy link
Contributor

Tobion commented Aug 19, 2014

👍

@webmozart webmozart merged commit ce1d209 into symfony:master Aug 19, 2014
webmozart added a commit that referenced this pull request Aug 19, 2014
… (webmozart)

This PR was merged into the 2.6-dev branch.

Discussion
----------

[Validator] Added ConstraintViolation::getConstraint()

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #5050
| License       | MIT
| Doc PR        | -

This PR adds a `getConstraint()` method to the `ConstraintViolation` in order to access the constraint causing the violation.

Related to #7276, #7273 and #9691.

Commits
-------

ce1d209 [Validator] Added ConstraintViolation::getConstraint()
@webmozart webmozart deleted the violation-get-constraint branch September 11, 2014 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants