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
Agreed, as a workaround to other bugs/behaviour with missing slashes in URLs we change the server request uri so that it always has a trailing slash. This unfortunately breaks optional values.
So what /foo/{param} currently means is /foo(/{param}).
And with /foo/({param}) it would match /foo/ as you wanted. And /foo would redirect to /foo/ as we already do.
When defining a route like this:
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:
see fabpot/Silex#485
The text was updated successfully, but these errors were encountered: