Closed
Description
(Derived from #2951)
Generating the current URL is sometimes useful, one common example is to create links to the same page with a different locale, but there are other use cases like multi-parameterized routes where you want to change one while keeping the rest intact.
I would like to propose the following alternatives (in twig helpers, but the same should be added to the UrlGenerator obviously):
{{ path(null, {foo:"bar"}) }}
:null
would generate the current route, and automatically merge the second arg with the current requests's_route_params
.{{ self({foo: "bar"}) }}
: a new helper for this behavior instead of hackishnull
behavior.