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] fixed duplicate constraints with parent class interfaces#19580

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:2.7fromdmaicher:issue-19516
Aug 23, 2016

Conversation

@dmaicher
Copy link
Contributor

@dmaicherdmaicher commentedAug 9, 2016
edited
Loading

QA
Branch?2.7
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#19516
LicenseMIT
Doc PR-

Thisfixes#19516

if ('Symfony\Component\Validator\GroupSequenceProviderInterface' ===$interface->name) {
if (
'Symfony\Component\Validator\GroupSequenceProviderInterface' ===$interface->name ||
$parent &&$parent->implementsInterface($interface->name)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it work for a child of a child?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I think it should work 😉 No matter at which level (starting at the parent then going upwards to the parent of the parent etc.) the interface is implemented this condition will be true.

Or what exactly do you mean?

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean I was wondering about the pertinence of adding a test for it but you look pretty sure :)

@dmaicherdmaicherforce-pushed theissue-19516 branch 2 times, most recently fromf411c08 to7b4d8b1CompareAugust 9, 2016 19:57
foreach ($metadata->getReflectionClass()->getInterfaces()as$interface) {
if ('Symfony\Component\Validator\GroupSequenceProviderInterface' ===$interface->name) {
if ('Symfony\Component\Validator\GroupSequenceProviderInterface' ===$interface->name
||$parent &&$parent->implementsInterface($interface->name)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd keep the condition in a single line, but add parenthesis to make precedence explicit.

Copy link
Member

Choose a reason for hiding this comment

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

We don't enforce line length in Symfony, so keeping everything on one line is the way to go.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I changed it 👍

@dmaicher
Copy link
ContributorAuthor

@webmozart you are probably the most qualified to say if this fix is correct? 😊

@dmaicher
Copy link
ContributorAuthor

@fabpot@stof@nicolas-grekas who could have a look at this? 😊

@nicolas-grekas
Copy link
Member

👍

@fabpot
Copy link
Member

Thank you@dmaicher.

@fabpotfabpot merged commitfb36c5a intosymfony:2.7Aug 23, 2016
fabpot added a commit that referenced this pull requestAug 23, 2016
…interfaces (dmaicher)This PR was merged into the 2.7 branch.Discussion----------[Validator] fixed duplicate constraints with parent class interfaces| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#19516| License       | MIT| Doc PR        | -Thisfixes#19516Commits-------fb36c5a [Validator] fixed duplicate constraints with parent class interfaces
This was referencedSep 2, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@dmaicher@nicolas-grekas@fabpot@jakzal@linaori@HeahDude@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp