Bug #45463

Routing includes object arguments even though it should not

Added by Karsten Dambekalns over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Should have
Category:
MVC - Routing
Target version:
-
Start date:
2013-02-13
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

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…

#1

Updated by Bastian Waidelich over 8 years ago

  • Status changed from New to Accepted
#2

Updated by Gerrit Code Review over 8 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 8 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 8 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 8 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 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF