Skip to content

[Routing] Generating URLs with host matching #6857

Closed
@zachbadgett

Description

@zachbadgett

Currently running into an issue with the new host matching when I'm trying to generate urls that requires me to pass in a host parameter.

InternalUserController:
    resource: "@ApiBundle/Controller/Internal/UserController.php"
    type: annotation
    host: "api.{domain}"

DashboardController:
    resource: "@DashboardBundle/Controller/DashboardController.php"
    type: annotation
    host: "{domain}"

The examples above work perfectly with the url matcher, but when needing to generate the url, it will require me to provide the domain parameter each time. I know this is how it's suppose to function, but it seems a bit annoying to require putting in the domain each time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions