Symfony 2 - When and why does a route parameter get automatically converted? -
i have route: pfs_platform_home: path: /{page}/{reset} defaults: { _controller: pfsplatformbundle:advert:index, page: 1, reset: true } requirements: page: \d* reset: true|false if use link without specifying reset , router uses default value , in indexaction, reset parameter automatically converted boolean true . i.e.: <li><a href="{{ path('pfs_platform_home') }}">inicio</a></li> but when that, time $reset appears string 'false' in indexaction, not boolean: <a href="{{ path('pfs_platform_home', {'page': p, 'reset': 'false'}) }}">{{ p }}</a> what missing? url paths , parameters strings. if have url like http://example.com/page/true?foo=2&bar=false the server cannot know true should interpreted boolean, while foo supposed integer , bar supposed boolean, too. if want process url parameters, pass , treat them strings. later, can vali...