-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
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
commented
Jun 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 changes
Jun 28, 2019
Tobion
reviewed
Jun 28, 2019
src/Symfony/Component/Validator/Tests/Violation/ConstraintViolationBuilderTest.php
Outdated
Show resolved
Hide resolved
fabpot
approved these changes
Jun 29, 2019
Thinking about it, would it be feasible to use |
@fabpot All our built-in constraints already use UUID strings as the code. |
fabpot
approved these changes
Jul 3, 2019
Thank you @xabbuh. |
fabpot
added a commit
that referenced
this pull request
Jul 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 request
Jul 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 <!-- see https://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/A Fixes the following tests currently failing on master, as well as a bug where a null code was printed: ```diff 1) Symfony\Component\Validator\Tests\ConstraintViolationListTest::testToString Failed 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 )\n 2) Symfony\Component\Validator\Tests\ConstraintViolationTest::testToStringHandlesArrays Failed asserting that two strings are identical. --- Expected +++ Actual @@ @@ 'Root.property.path: - Array' + Array (code )' 3) Symfony\Component\Validator\Tests\ConstraintViolationTest::testToStringHandlesArrayRoots Failed 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::testToStringOmitsEmptyCodes Failed 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::testNonStringCode Failed asserting that '42' is identical to 42. 6) Symfony\Component\Validator\Tests\Violation\ConstraintViolationBuilderTest::testNonStringCode Failed asserting that '42' is identical to 42. ``` Commits ------- 22c58f5 [Validator] Fix tests
This was referenced Nov 12, 2019
Merged
Merged
Sign up for free
to 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.