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] deprecate non-string constraint violation codes#32265
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
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Member
xabbuh commentedJun 28, 2019
| Q | A |
|---|---|
| Branch? | 4.4 |
| Bug fix? | no |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | yes |
| Tests pass? | yes |
| Fixed tickets | #32066 (comment) |
| License | MIT |
| Doc PR |
Tobion approved these changesJun 28, 2019
src/Symfony/Component/Validator/Tests/Violation/ConstraintViolationBuilderTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
fabpot approved these changesJun 29, 2019
Member
fabpot commentedJun 29, 2019
Thinking about it, would it be feasible to use |
MemberAuthor
xabbuh commentedJun 29, 2019
@fabpot All our built-in constraints already use UUID strings as the code. |
fabpot approved these changesJul 3, 2019
Member
fabpot commentedJul 3, 2019
Thank you@xabbuh. |
fabpot added a commit that referenced this pull requestJul 3, 2019
…codes (xabbuh)This PR was merged into the 4.4 branch.Discussion----------[Validator] deprecate non-string constraint violation codes| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | yes| Tests pass? | yes| Fixed tickets |#32066 (comment)| License | MIT| Doc PR |Commits-------e217729 deprecate non-string constraint violation codes
Merged
nicolas-grekas added a commit that referenced this pull requestJul 4, 2019
This PR was merged into the 5.0-dev branch.Discussion----------[Validator] Fix tests| Q | A| ------------- | ---| Branch? | master <!-- see below -->| Bug fix? | yes| New feature? | no <!-- please update src/**/CHANGELOG.md files -->| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets | relates to#32265 <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR | N/AFixes the following tests currently failing on master, as well as a bug where a null code was printed:```diff1) Symfony\Component\Validator\Tests\ConstraintViolationListTest::testToStringFailed asserting that two strings are equal.--- Expected+++ Actual@@ @@ 'Root:\n- Error 1\n+ Error 1 (code )\n Root.foo.bar:\n- Error 2\n+ Error 2 (code )\n Root[baz]:\n- Error 3\n+ Error 3 (code )\n foo.bar:\n- Error 4\n+ Error 4 (code )\n [baz]:\n- Error 5\n+ Error 5 (code )\n2) Symfony\Component\Validator\Tests\ConstraintViolationTest::testToStringHandlesArraysFailed asserting that two strings are identical.--- Expected+++ Actual@@ @@ 'Root.property.path:- Array'+ Array (code )'3) Symfony\Component\Validator\Tests\ConstraintViolationTest::testToStringHandlesArrayRootsFailed asserting that two strings are identical.--- Expected+++ Actual@@ @@ 'Array.some_value:- 42 cannot be used here'+ 42 cannot be used here (code )'4) Symfony\Component\Validator\Tests\ConstraintViolationTest::testToStringOmitsEmptyCodesFailed asserting that two strings are identical.--- Expected+++ Actual@@ @@ 'Array.some_value:- 42 cannot be used here'+ 42 cannot be used here (code )'5) Symfony\Component\Validator\Tests\ConstraintViolationTest::testNonStringCodeFailed asserting that '42' is identical to 42.6) Symfony\Component\Validator\Tests\Violation\ConstraintViolationBuilderTest::testNonStringCodeFailed asserting that '42' is identical to 42.```Commits-------22c58f5 [Validator] Fix tests
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.