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

[Validator] Added the missing constraints instance checks #29223

Merged
merged 1 commit into from Nov 15, 2018

Conversation

Projects
None yet
5 participants
@thomasbisignani
Contributor

thomasbisignani commented Nov 14, 2018

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

This PR adds the constraints instance checks missing to limit the validators use.

This behavior is already implemented in all built-in validators, but it was missed in two validators.

@ro0NL

This comment has been minimized.

Contributor

ro0NL commented Nov 14, 2018

i think we should target master for this, as a new feature. IMHO a deprecation is not really worth it, so 👍 for throwing.

@stof

This comment has been minimized.

Member

stof commented Nov 14, 2018

Well, the code of the validator already expects the right class due to property being used. So these are about providing a good error message in case you mess your project configuration, but it probably already does not work (with a crappier error message) in case of such mess.
So 👍 for adding the exception directly.

@nicolas-grekas nicolas-grekas added this to the 2.8 milestone Nov 14, 2018

@ro0NL

This comment has been minimized.

Contributor

ro0NL commented Nov 14, 2018

@stof unless someone completely mimics the exepcted api with its own constraint class :}

@stof

stof approved these changes Nov 15, 2018

@nicolas-grekas

This comment has been minimized.

Member

nicolas-grekas commented Nov 15, 2018

Thank you @thomasbisignani.

@nicolas-grekas nicolas-grekas merged commit 0ecaead into symfony:2.8 Nov 15, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details

nicolas-grekas added a commit that referenced this pull request Nov 15, 2018

bug #29223 [Validator] Added the missing constraints instance checks …
…(thomasbisignani)

This PR was merged into the 2.8 branch.

Discussion
----------

[Validator] Added the missing constraints instance checks

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

This PR adds the constraints instance checks missing to limit the validators use.

This behavior is already implemented in all built-in validators, but it was missed in two validators.

Commits
-------

0ecaead [Validator] Added the missing constraints instance checks

@fabpot fabpot referenced this pull request Nov 16, 2018

Merged

Release v4.2.0-BETA2 #29237

This was referenced Nov 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment