Closed
Description
The documentation implies that passing true
as the third parameter to generateUrl
will generate an absolute URL, including the scheme. This works as expected for a https URL, but in the case of a http URL, the scheme gets dropped. As a workaround I'm passing a 0 as the third argument:
foo_route:
path: /foo
defaults: { _controller: FooBundle:Bar:index }
schemes: [http]
// Returns: //mydomain.com/foo
$this->generateUrl('foo_route', [], true);
// Returns: http://mydomain.com/foo
$this->generateUrl('foo_route', [], 0);
Is this a bug?
Metadata
Metadata
Assignees
Labels
No labels