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] AllowConstraintViolation::__toString() to expose codes that are not null or emtpy strings#29375

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

Conversation

@phansys
Copy link
Contributor

QA
Branch2.8
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRn/a

Allow to expose0 or"0" validation codes.


$propertyPath = (string)$this->propertyPath;
$code =$this->code;
$code =trim($this->code);
Copy link
Contributor

Choose a reason for hiding this comment

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

trimming is a new behavior, which IMHO is not needed.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I understand your point, and I agree. My concern was originated by the absence of delimiters around the printed code, so I thought that readability could be improved trimming any undesired blankspace around the code.

Copy link
Contributor

Choose a reason for hiding this comment

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

the delimiter is(code and) :)

undesired blankspace

we don't know that

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I mean cases like

(code    )

I think it is not clear which space comes from the dumped message and which one comes from the actual code, but I'm pretty sure this is an edge case that we can ignore.

ro0NL reacted with thumbs up emoji
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

(for 3.4 as 2.8 is EOLed now)

@phansysphansys changed the base branch from2.8 to3.4November 30, 2018 22:17
@phansys
Copy link
ContributorAuthor

Updated base to target 3.4.

@nicolas-grekasnicolas-grekasforce-pushed theconstraint_violation_tostring branch from1cbe5dc to7bb0fb5CompareDecember 1, 2018 08:21
@nicolas-grekas
Copy link
Member

Thank you@phansys.

phansys reacted with hooray emoji

@nicolas-grekasnicolas-grekas merged commit7bb0fb5 intosymfony:3.4Dec 1, 2018
nicolas-grekas added a commit that referenced this pull requestDec 1, 2018
…xpose codes that are not null or emtpy strings (phansys)This PR was squashed before being merged into the 3.4 branch (closes#29375).Discussion----------[Validator] Allow `ConstraintViolation::__toString()` to expose codes that are not null or emtpy strings|Q            |A  ||---          |---||Branch       |2.8||Bug fix?     |yes||New feature? |no ||BC breaks?   |no ||Deprecations?|no ||Tests pass?  |yes||Fixed tickets|n/a||License      |MIT||Doc PR       |n/a|Allow to expose `0` or `"0"` validation codes.Commits-------7bb0fb5 [Validator] Allow `ConstraintViolation::__toString()` to expose codes that are not null or emtpy strings
@phansysphansys deleted the constraint_violation_tostring branchDecember 1, 2018 10:20
This was referencedDec 6, 2018
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

@ro0NLro0NLro0NL approved these changes

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.

5 participants

@phansys@nicolas-grekas@ro0NL@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp