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

[PropertyAccess] Handle interfaces in the invalid argument exception#21360

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

Closed
fancyweb wants to merge2 commits intosymfony:2.7fromfancyweb:patch-2

Conversation

@fancyweb
Copy link
Contributor

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

Before :
Expected argument of type "dule\MenuBundle\Entity\AbstractMenu::setMenuElements() must implement interface Doctrine\Common\Collections\Collection", "array" given

After :
Expected argument of type "Doctrine\Common\Collections\Collection", "array" given

@xabbuh
Copy link
Member

Can you add a test for this?

@nicolas-grekasnicolas-grekas added this to the2.7 milestoneJan 24, 2017

/**
* @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidArgumentException
* @expectedExceptionMessage Expected argument of type "Countable", "string" given
Copy link
Member

Choose a reason for hiding this comment

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

I would have expected a test checking for the new "must implement interface" string in the exception message.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I don't get it : the "must implement interface" comes from the PHP exception that is handled and then the InvalidArgumentException is thrown.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, you are right. I misread the changes you made.

Copy link
Member

@xabbuhxabbuh left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@fabpot
Copy link
Member

Thank you@fancyweb.

fabpot added a commit that referenced this pull requestJan 25, 2017
… exception (fancyweb)This PR was squashed before being merged into the 2.7 branch (closes#21360).Discussion----------[PropertyAccess] Handle interfaces in the invalid argument exception| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | no| Fixed tickets | -| License       | MIT| Doc PR        | -Before :`Expected argument of type "dule\MenuBundle\Entity\AbstractMenu::setMenuElements() must implement interface Doctrine\Common\Collections\Collection", "array" given`After :`Expected argument of type "Doctrine\Common\Collections\Collection", "array" given`Commits-------be52b39 [PropertyAccess] Handle interfaces in the invalid argument exception
@fabpotfabpot closed thisJan 25, 2017
@fabpotfabpot mentioned this pull requestJan 28, 2017
This was referencedFeb 6, 2017
@fancywebfancyweb deleted the patch-2 branchMarch 24, 2017 07:40
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@xabbuhxabbuhxabbuh approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

2.7

Development

Successfully merging this pull request may close these issues.

5 participants

@fancyweb@xabbuh@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp