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

Extension for PHPStan to allow analysis of Drupal code.

Results 161 phpstan-drupal issues
Sort by recently updated
recently updated
newest added

Drush allows libraries to provide commands via autoloading patterns. phpstan-drupal could provide one which generated the phpstan.neon for a project. It could also generate the entity mapping and other stateful...

CR here: https://www.drupal.org/node/3161210

This has been deprecated in favour of a 'bundle' route parameter: CR: https://www.drupal.org/node/3155569

WHen there is a `hook_entity_*` hook, verify the parameter has a type hint to `EntityInterface`. If we encounter `hook_ENTITY_TYPE_*`, check if the parameter is still `EntityInterface`, flag for a more...

enhancement

Make sure hooks which implement `hook_form_alter` have correct parameter types. `hook_form_alter`: * `array $form` * `FormStateInterface $form_state` * `string $form_id` Note: strict rule idea, not added by default, but rejects...

enhancement

I want to fix any performance problems caused by the autoloader provided here or other items in this codebase. ![Screen Shot 2022-01-31 at 11 45 55 AM](https://user-images.githubusercontent.com/3698644/151846281-0c0b645d-0662-4f85-a04e-42290ab968bd.png) The call to...

**How is drupal-check installed?** - [ ] drupal-check is installed using the phar - [ ] drupal-check is installed globally via Composer - [ ] drupal-check is installed globally using...

bug

This verifies a Drupal core bug when processing LinkItemTest Fixes #228

Classes with the dependency serialization trait will break as the trait cannot handle serialization of properties.

enhancement

In PHP 7 calling a non-static method statically only threw a notice or warning. In PHP 8 it will cause EXPLOSIONS 🤯 . Example code: ``` class MyForm extends BaseForm...

enhancement