Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Confirm if class and action method exist for Symfony controller definition #285

Open
DAcodedBEAT opened this issue Jun 29, 2022 · 0 comments

Comments

@DAcodedBEAT
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant