Closed
Description
In a Controller, I have two actions :
/**
* @Route("/search", name="search_with_default", defaults={"p"=1})
*/
public function searchWithDefaultAction(Request $request)
{
return $this->render('default/index.html.twig');
}
/**
* @Route("/search", name="search_without_default")
*/
public function searchWithoutDefaultAction(Request $request)
{
return $this->render('default/index.html.twig');
}
In twig, I generate routes to these actions with an additional GET parameter 'p' :
{{ path('search_with_default',{'p':2}) }}<br/>
{{ path('search_without_default',{'p':2}) }}
Result :
/app_dev.php/search
/app_dev.php/search?p=2
The first one, totally ignore the value assigned on 'p'.
Bug reproduced here :
https://github.com/Alsatian67/symfony-standard
(index page shows the two paths)