Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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
fabpot merged 1 commit intosymfony:4.4fromxabbuh:pr-32066
Jul 3, 2019

Conversation

@xabbuh
Copy link
Member

QA
Branch?4.4
Bug fix?no
New feature?no
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed tickets#32066 (comment)
LicenseMIT
Doc PR

@fabpot
Copy link
Member

Thinking about it, would it be feasible to useint instead ofstring. That seems more "natural" in PHP to have error codes asints.

@xabbuh
Copy link
MemberAuthor

@fabpot All our built-in constraints already use UUID strings as the code.

@fabpot
Copy link
Member

Thank you@xabbuh.

@fabpotfabpot merged commite217729 intosymfony:4.4Jul 3, 2019
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
@xabbuhxabbuh deleted the pr-32066 branchJuly 3, 2019 14:03
@ogizanagiogizanagi mentioned this pull requestJul 4, 2019
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
@nicolas-grekasnicolas-grekas modified the milestones:next,4.4Oct 27, 2019
This was referencedNov 12, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

+1 more reviewer

@TobionTobionTobion approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

5 participants

@xabbuh@fabpot@Tobion@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp