Skip to content

Symfony4: Route not found with path param with a dot #25911

Closed
@mrljaime

Description

@mrljaime
Q A
Bug report? yes
Feature request? no
BC Break report? yes
RFC? yes/no
Symfony version 4.0.3

I have notice that {_format} placeholder avoid that routes matches with dots:

/**
 * @Route("/report/{paysheet}")
 *
 * @param $paysheet
 * @return JsonResponse
*/

When I make a request with this path below /report/5a29775c880fc0.79633949 I have this response:

The requested resource /report/5a29775c880fc0.79633949 was not found on this server.

Notice that path param is a uniqid("", true)

I even tryed to add in the requirements section a regular expression to catch that dot without any success.

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