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
UrlGeneratorInterface::generate as well as proxy methods in the base controller could check if the given route name is part of the defined routes in the application.
When refactoring routes it happens once in a while something gets missed and it occurred to me that PHPStan probably could have saved my ass. If the route is not commonly used it can otherwise go missed for a while until it fails at runtime.
One could even push this further to check param types by looking at the route pattern and what types the linked action require I guess.
The text was updated successfully, but these errors were encountered:
Just a feature idea:
UrlGeneratorInterface::generate as well as proxy methods in the base controller could check if the given route name is part of the defined routes in the application.
When refactoring routes it happens once in a while something gets missed and it occurred to me that PHPStan probably could have saved my ass. If the route is not commonly used it can otherwise go missed for a while until it fails at runtime.
One could even push this further to check param types by looking at the route pattern and what types the linked action require I guess.
The text was updated successfully, but these errors were encountered: