Skip to content

[Routing] Routes only for generation, not matching #13001

@acasademont

Description

@acasademont

We would like to know if there is interest in having a new attribute in a Route that tags it as a generation-only route or a generation-and-matching route. Let me explain myself why would that be useful.

We have a backend in a different symfony repo that needs to generate routes for the frontend (emails, batch processing of multiple things, etc). We can import the routes of the frontend with the "host" param, but those routes will be also put in the route matcher, which it's not necessary, adds overhead, we only need them for generation purposes.

I think it's not complicated to add such a new option and only put those tagged routes in the UrlGenerator. Of course by default all routes would be put in the UrlMatchr and UrlGenerator to have BC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions