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] pass error code as a string#32244

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
nicolas-grekas merged 1 commit intosymfony:3.4fromxabbuh:validator-string-code
Jun 28, 2019

Conversation

@xabbuh
Copy link
Member

QA
Branch?3.4
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PR

@nicolas-grekas
Copy link
Member

What's the goal of this change?

$this->assertSame('Invalid value',$violations[0]->getInvalidValue());
$this->assertSame(2,$violations[0]->getPlural());
$this->assertSame(42,$violations[0]->getCode());
$this->assertSame('42',$violations[0]->getCode());
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

The argument is documented asstring inConstraintViolationBuilderInterface::setCode(). When adding type-hints in 5.0, we will need to compare the returned code with the string'42'. Making the change in the test here makes it consistent across all branches.

Copy link
Contributor

Choose a reason for hiding this comment

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

@nicolas-grekas
Copy link
Member

Thank you@xabbuh.

@nicolas-grekasnicolas-grekas merged commit901fe0d intosymfony:3.4Jun 28, 2019
nicolas-grekas added a commit that referenced this pull requestJun 28, 2019
This PR was merged into the 3.4 branch.Discussion----------[Validator] pass error code as a string| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        |Commits-------901fe0d pass error code as a string
@xabbuhxabbuh deleted the validator-string-code branchJune 28, 2019 12:50
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

+1 more reviewer

@TobionTobionTobion left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

4 participants

@xabbuh@nicolas-grekas@Tobion@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp