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][DX] Enhance exception that say that some methods are missing if they don't#18732

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
nykopol wants to merge5 commits intosymfony:2.7fromnykopol:enhancement_exception

Conversation

@nykopol
Copy link
Contributor

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

When you try do define a manyToMany association but you don't give an array or \Traversable, the raised exception say that some methods are missing while they don't. This PR check if the adder and setter methods exists and if so, give a exception that pointing on the real problem.

@xabbuh
Copy link
Member

@nykopol Can you please also add a test to prevent future regressions?

@nykopol
Copy link
ContributorAuthor

@xabbuh I added the test.

@javiereguiluzjaviereguiluz added Feature DXDX = Developer eXperience (anything that improves the experience of using Symfony) labelsMay 10, 2016
'"%s" given.',
$property,
$reflClass->name,
implode(' and',array_map(function($method){
Copy link
Contributor

Choose a reason for hiding this comment

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

It is offendingPSR-2 - 6.Closures.

// we call the getter and hope the __call do the job
$access[self::ACCESS_TYPE] =self::ACCESS_TYPE_MAGIC;
$access[self::ACCESS_NAME] =$setter;
}elseif (null !==$this->findAdderAndRemover($reflClass,$singulars)) {

Choose a reason for hiding this comment

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

null !== $methods = ...

@fabpot
Copy link
Member

Thank you@nykopol.

fabpot added a commit that referenced this pull requestJun 15, 2016
…methods are missing if they don't (nykopol)This PR was squashed before being merged into the 2.7 branch (closes#18732).Discussion----------[PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#18694| License       | MIT| Doc PR        |When you try do define a manyToMany association but you don't give an array or \Traversable, the raised exception say that some methods are missing while they don't. This PR check if the adder and setter methods exists and if so, give a exception that pointing on the real problem.Commits-------c46519b [PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't
@fabpotfabpot closed thisJun 15, 2016
This was referencedJun 30, 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

Labels

DXDX = Developer eXperience (anything that improves the experience of using Symfony)FeaturePropertyAccessStatus: Needs Review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@nykopol@xabbuh@fabpot@nicolas-grekas@phansys@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp