Skip to content

"Routes with optional parameters at the end will not match on requests with a trailing slash" isn't true #12444

Closed
@Ahmed-Ayman

Description

@Ahmed-Ayman

here

a note is saying Routes with optional parameters at the end will not match on requests with a trailing slash (i.e. /blog/ will not match, /blog will match).

now I have created an optional @Route("/blog/{page<\d+>}") and tried /blog/ on chrome and it matched the route that I have already set to a default int $page = 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions