symfony/symfony — pull request #11380 by artursvonda (2014-07-11 18:43:28+00:00)
Title: [Routing] Add matched and default parameters to redirect responses

| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |

I ran into an issue recently. We're using security expressions and we're matching against route params. Since redirect didn't add matched route params to redirect response, firewall wasn't matching rule and was throwing AccessDenied exception. This patch adds matched and defaults to redirect params.

Code could be improved to return straight away if there won't be redirect.