phpstan-drupal
phpstan-drupal copied to clipboard
Extension for PHPStan to allow analysis of Drupal code.
# Feature request Drupal coding standards force `Implements ...`, which allows us to derive the hook name properly. Useful for dynamic hook names like `hook_field_widget_WIDGET_TYPE_form_alter`
# Feature request Title kinda says it all, related to https://www.drupal.org/project/drupal/issues/3400366
# Feature request Annotations in PHP are [not inherited ](https://blog.shalvah.me/posts/php-8-attribute-quirks) > Does m in the child inherit the attributes from m in the parent? What about if it's protected, or...
# Feature request Over in https://www.drupal.org/project/drupal/issues/3268489 catch wrote: > The ending with test feels like something we could add to phpstan - any non-abstract subclass of whatever the root test...
# Feature request Let's say I'm altering a form and I'm adding: ``` function MYMODULE_form_alter(array &$form, FormStateInterface $form_state) { $form['#validate'][] = 'this_function_does_not_exist'; } ``` it would be nice if I...
Direction is wrong. As a test case you can use something like this: ```php class XClass { public function foo(ModuleHandler $a, ModuleHandlerInterface $b, object $c, mixed $d) { $a->loadInclude('non_existing_module', 'inc',...
# Bug report _(Now that all Entity Query problems seem to be solved, I looked a bit closer at the Trusted Callbacks, so expect some more issues on that)_ Currently...
# Bug report This is just the hardest deprecation to detect... My guess is that because the query is setup in one method but the execution happens in several others...
**How is drupal-check installed?** drupal-check is installed as a dependency to my project **Environment:** - OS: MacOS - PHP Version: 7.3 - Drupal core: 9.3.12 **Describe the bug** When running...
# Feature request Classic example of failed deprecation discovery due to level 0 and undefined methods: #210. I wonder if we could fix that using a type specifying extension. ```...