Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[HttpKernel] Allow variadic controller parameters to be resolved.#15777
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
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.
you first have to check if this method exists, as Symfony should also support PHP 5.3, 5.4 and 5.5.
stof commentedSep 16, 2015
you also need to handle the case of a variadic parameter not being passed, to avoid throwing an exception in such case (see how it is done inhttps://github.com/symfony/symfony/pull/15426/files for the serializer) |
| Q | A| ------------- | ---| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | n/a| License | MIT| Doc PR | n/aVariadic parameters in controller signature were not handled correctly by the `ControllerResolver`.
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.
Should beassertSame() asassertEquals() would not make a distinction between['foo', $param1, $param2] and['foo', $param1, $param1].
Also, consider using strings instead ofstdClass here. In this case type doesn't matter and if we can make the test shorter, we should ;)
fabpot commentedOct 19, 2015
@NiR- Can you have a look at the comments and finish this PR? |
fabpot commentedJan 25, 2016
@NiR- Any news? |
fabpot commentedMar 1, 2016
This PR was merged into the 2.3 branch.Discussion----------Variadic controller params| Q | A| ------------- | ---| Branch | 2.3| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#15777| License | MITCommits-------bedcb15 simplified codef39afc8 Allow variadic controller parameters to be resolved.
Variadic parameters in controller signature were not handled correctly by the
ControllerResolver.