phpstan-symfony
phpstan-symfony copied to clipboard
Feature request: Confirm if class and action method exist for Symfony controller definition
Currently, if a controller definition refers to a non-existent class/action method an error would be raised at time of route invocation.
example routing definition:
example_route:
path: /example/route
controller: nonexistent_controller_class::indexAction
When curl
'ing this route, this raises the following exception:
InvalidArgumentException
The controller for URI "/example/route" is not callable: Controller "nonexistent_controller_class" does neither exist as service nor as class.
I would like phpstan-symfony to analyze route definitions so errors like this can be caught ahead of time rather than at runtime.