You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
when importing routes from a resource file with a prefix, symfony will not match a valid route
with an allowable empty prefix unless the URL has a double / in it (//).
the router will match: /valueA/brands/{brand_name}/{id}.html and /valueB/brands/{brand_name}/{id}.html but will not match /brands/{brand_name}/{id}.html unless you provide the URL like this: //brands/{brand_name}/{id}.html
Possible Solution
Allow for optional prefix values when importing routes.
The text was updated successfully, but these errors were encountered:
Are optional prefix possible at all? I don't think that is supported. Ref. #31166
So //brands/{brand_name}/{id}.html just matches an empty string for {route_prefix} and /brands/{brand_name}/{id}.html is not supported as optional prefixes are not implemented AFAIK.
Uh oh!
There was an error while loading. Please reload this page.
Symfony version(s) affected: 4.4
Description
when importing routes from a resource file with a
prefix
, symfony will not match a valid routewith an allowable empty
prefix
unless the URL has a double/
in it (//
).How to reproduce
Given this setting:
and _routes.yaml:
the router will match:
/valueA/brands/{brand_name}/{id}.html
and/valueB/brands/{brand_name}/{id}.html
but will not match/brands/{brand_name}/{id}.html
unless you provide the URL like this://brands/{brand_name}/{id}.html
Possible Solution
Allow for optional prefix values when importing routes.
The text was updated successfully, but these errors were encountered: