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
This is odd and I'm sure this is not the way to go.
When navigating to a route with an optional parameter that has the "!" character (which means the default value will always be included in the generate function) you're required to pass that default parameter when navigating to it.
Which means the optional parameter doesn't have any purpose. As you're required to type it or it throws a ResourceNotFoundException
I don't think this is a bug. The ! declarares the parameter as non-optional for matching. So the default value is only used for generating URLs but not for matching.
The reason is explained in #29599 (comment)
Symfony version(s) affected
5.4.8
Description
This is odd and I'm sure this is not the way to go.
When navigating to a route with an optional parameter that has the "!" character (which means the default value will always be included in the generate function) you're required to pass that default parameter when navigating to it.
Which means the optional parameter doesn't have any purpose. As you're required to type it or it throws a ResourceNotFoundException
How to reproduce
Using the example from the announcement blogpost
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: