Skip to content

Consider adding the trailing separator as optional for optional values #5918

@fabpot

Description

@fabpot

When defining a route like this:

/foo/{param}

with a default value for param, you can omit the param and Symfony will match a URL like /foo. But it won't match /foo/.

Would it make sense to allow it? What are the consequences on BC?

Or do we need to introduce a special syntax for optional parameters:

/foo/{?param}

/foo{/?param}

see fabpot/Silex#485

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