-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
I'm using a component library that uses dashes ("-") in parameter name. The current implementation of Symfony routes doesn't allow dashes in placeholders like /detail/{d-product-id}.
I've tried to make a patch that changes this behavior by modifying the regex to "{[\w-]+}" which worked fine for generating URLs. The other way round to extract the parameter values and assign them to the placeholder (d-product-id) seems much more complicated as the RouteCompiler class uses named regex placeholders (P(...)) and "name" must only consist of word characters. Also, if values should be injected as parameters in actions, dashes are not allowed.
Is there a possibility to get an implementation that accepts dashes in placeholders?
Metadata
Metadata
Assignees
Labels
No labels