Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
xabbuh commentedMay 9, 2016
@nykopol Can you please also add a test to prevent future regressions? |
nykopol commentedMay 10, 2016
@xabbuh I added the test. |
| '"%s" given.', | ||
| $property, | ||
| $reflClass->name, | ||
| implode(' and',array_map(function($method){ |
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
null !== $methods = ...
fabpot commentedJun 15, 2016
Thank you@nykopol. |
…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
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.