phpstan-drupal icon indicating copy to clipboard operation
phpstan-drupal copied to clipboard

Provide a way to inspect controllers

Open mglaman opened this issue 3 years ago • 2 comments

Per https://github.com/mglaman/phpstan-drupal/issues/338 it'd be great if there was a way to inspect a controller or controller method

This way we could check for incorrect arguments and types, along with deprecated access checks or more.

mglaman avatar Feb 23 '22 04:02 mglaman

I'm not sure what you do mean here 🤔 Verifying if the controller match the route definition for instance?

brambaud avatar Apr 04 '22 09:04 brambaud

Ah, I wish I knew. Maybe it was inferring the arguments from the route path to the controller method. And if there are options defining the parameter types we could match.

It's probably too expensive (parsing more YAML.) But that was the idea

mglaman avatar Apr 04 '22 23:04 mglaman