You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is a problem because when you work with locales, you need to explicitly add the locale param to each route. A more sensible idea would be to override the defaults with the current context, and override that result with additional params, like so:
This PR was merged into the master branch.
Commits
-------
e22823b [Routing] context params should have higher priority than defaults
16c1b01 [Routing] fixed 4 bugs in the UrlGenerator
Discussion
----------
[Routing] UrlGenerator: fixed missing query param and some ignored requirements
reopened version of #5181 (cherry-picked)
On top of that I fixed#5437 in my code and added test case.
---------------------------------------------------------------------------
by Tobion at 2012-10-03T18:41:45Z
@fabpot ping
---------------------------------------------------------------------------
by fabpot at 2012-10-03T18:43:43Z
IIUC, #5437 is a regression in 2.1 and should be done in 2.1, no?
---------------------------------------------------------------------------
by Tobion at 2012-10-03T18:46:42Z
It's not in 2.1 anymore as you reverted the PR. #5437 is not valid currently and can be closed.
So this can either be merged in master or 2.1 whatever you prefer.
I noticed that the current Route context is overridden when generating new routes This behaviour is the result of line 165 in https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Routing/Generator/UrlGenerator.php#L136.
I think this is a problem because when you work with locales, you need to explicitly add the locale param to each route. A more sensible idea would be to override the defaults with the current context, and override that result with additional params, like so:
In this case, the locale is kept for each generated route, unless you explicitly specify it.
The text was updated successfully, but these errors were encountered: