phpstan-drupal
phpstan-drupal copied to clipboard
Extension for PHPStan to allow analysis of Drupal code.
# Feature request `\Drupal\Core\Config\Config::get` returns mixed. Given the following code in a functional test: ``` $theme = $this->config('system.theme')->get('default'); $this->assertStringContainsString('foo', $theme); ``` When I analyze it with phpstan level 9 I...
# Feature request While https://www.drupal.org/node/3432087 should improve phpstan processing of `FormBuilderInterface::getForm()`, it'd be great if we could use the first argument to look up what other arguments are valid. For...
Controllers in Drupal-10.2.0 are auto-wired. Ref - https://www.drupal.org/node/3395716 To have a new rule to check this (its mostly DX) (I know more general issue for different components - https://www.drupal.org/project/drupal/issues/3409787)
# Feature request See: https://www.drupal.org/project/drupal/issues/933004 for details.
# Bug report Drush is getting started with phpstan. I'm using latest versions and configured with a `drupal_root` but the code below is still warning: `Function locale_translation_flush_projects not found.`. ###...
Fixes #770 1. Added new options to bleeding edge. Current behaviour is the same. 2. Trigger deprecation notice when using old parameter, did not add a version since i dont...
# Feature request Follows up on #641 Drupal Slack link: https://drupal.slack.com/archives/C03L6441E1W/p1718043125262999 Summary: > :four: Detecting deprecated hooks with upgrade status module for Drupal 11 readiness Added with #634. But then...
# Bug report First, let me say that I think this is an edge case, so I really don't know if there's value in trying to solve this... would be...
# Feature request _Apologies if this was already an opened issue. I tried searching first, but I'm not 100% confident I didn't miss something._ It appears that in PHPStan rules...
# Feature request From [#phpstan Drupal slack](https://drupal.slack.com/archives/C033S2JUMLJ/p1718207295179729): In my project, I am using Drupal multisite, and have modules defined at `docroot/sites/mysite/modules/____`. So let's say I have 2 modules... `docroot/sites/mysite/modules/mySiteModule1` and...