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

[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

Closed
akerouanton wants to merge1 commit intosymfony:2.3fromakerouanton:variadic_controller_params
Closed

[HttpKernel] Allow variadic controller parameters to be resolved.#15777

akerouanton wants to merge1 commit intosymfony:2.3fromakerouanton:variadic_controller_params

Conversation

@akerouanton
Copy link

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRn/a

Variadic parameters in controller signature were not handled correctly by theControllerResolver.

Copy link
Member

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
Copy link
Member

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`.
Copy link
Contributor

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
Copy link
Member

@NiR- Can you have a look at the comments and finish this PR?

@fabpot
Copy link
Member

@NiR- Any news?

@fabpot
Copy link
Member

#17971

@fabpotfabpot closed thisMar 1, 2016
fabpot added a commit that referenced this pull requestMar 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.
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.

8 participants

@akerouanton@stof@fabpot@jakzal@nicolas-grekas@wouterj@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp