Closed
Description
Problem
In Symfony 2.x this is how you generate an absolute URL:
$this->get('router')->generate('route_name', $routeParams, true);
This is how you do the same in Symfony 3.x:
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
$this->get('router')->generate('route_name', $routeParams, UrlGeneratorInterface::ABSOLUTE_URL);
To me, the new version looks infinitely worse than the old one.
Solution
I guess Symfony Core won't accept bringing back the boolean argument, so we could add a new generateUrl()
method:
$this->get('router')->generateUrl('route_name', $routeParams);
Thoughts? Better ideas? Thanks!
Metadata
Metadata
Assignees
Labels
DX = Developer eXperience (anything that improves the experience of using Symfony)DX = Developer eXperience (anything that improves the experience of using Symfony)