Bug #45463
Routing includes object arguments even though it should not
Status: | Resolved | Start date: | 2013-02-13 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | MVC - Routing | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | No | Affected Flow version: | Git master |
Description
Given this route as the only active route:
- name: 'foo' uriPattern: 'foo(/{@action})' defaults: '@package': 'Acme.Demo' '@controller': 'Foo' '@action': 'index'
and a controller with this action:
/** * @param \Acme\Demo\Domain\Model\Foo $foo * @param string $bar */ public function removeBarAction(Foo $foo, $bar) {}
The following all works fine and results in a link being built (foo is an object):
<f:link.action action="removeBar" arguments="{foo: foo}"> <f:link.action action="removeBar" arguments="{xyz: foo}"> <f:link.action action="removeBar" arguments="{foo: foo, bar: foo}">
But this does not work (bar is a string):
<f:link.action action="removeBar" arguments="{foo: foo, bar: bar}">
The following happens inside the router:
So the arguments that are objects are considered internal, because there __
is involved…
Associated revisions
[BUGFIX] Routing includes object arguments even though it should not
Route::resolve() considered "__identity" arguments as internal and ignored them,
if they were not part of the respective Route defaults or uriPattern.
This change fixes this by only iterating through sub requests (marked with a "--")
Change-Id: I63d3c302524f832224bf0fdc7a6255cb631d16c8
Fixes: #45463
Releases: master, 2.0
[BUGFIX] Routing includes object arguments even though it should not
Route::resolve() considered "__identity" arguments as internal and ignored them,
if they were not part of the respective Route defaults or uriPattern.
This change fixes this by only iterating through sub requests (marked with a "--")
Change-Id: I63d3c302524f832224bf0fdc7a6255cb631d16c8
Fixes: #45463
Releases: master, 2.0
History
#1 Updated by Bastian Waidelich over 2 years ago
- Status changed from New to Accepted
#2 Updated by Gerrit Code Review over 2 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18302
#3 Updated by Gerrit Code Review over 2 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18302
#4 Updated by Gerrit Code Review over 2 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18302
#5 Updated by Gerrit Code Review over 2 years ago
Patch set 1 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/19092
#6 Updated by Bastian Waidelich over 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 890fda2e46eb3c3eb7147c3f985f847a65e03124.