phpstan-drupal
phpstan-drupal copied to clipboard
Extension for PHPStan to allow analysis of Drupal code.
I wouldn't want this without https://github.com/mglaman/phpstan-drupal/issues/385, with a way to disable the rule. Context https://twitter.com/nmdmatt/status/1514002594083098629?t=sgOdow5RhCxBYFH70fX_Qw&s=19
Part of https://github.com/mglaman/phpstan-drupal/issues/359. See [PHPStan documentation on Stub Files](https://phpstan.org/user-guide/stub-files). Create stub files for the following field types in a `stubs/Drupal/language/` directory: - `\Drupal\language\DefaultLanguageItem` Does not need `@phpdoc` changes since it...
Part of https://github.com/mglaman/phpstan-drupal/issues/359. See [PHPStan documentation on Stub Files](https://phpstan.org/user-guide/stub-files). Create stub files for the following field types in a `stubs/Drupal/datetime_range/Plugin/Field/FieldType` directory: - `\Drupal\datetime_range\Plugin\Field\FieldType\DateRangeItem` Add test cases to https://github.com/mglaman/phpstan-drupal/blob/main/tests/src/Type/data/field-types.php
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...
Since updating from 1.1.10 to 1.1.11 a small thing forced me to add additional typehinting to satisfy phpstan w/ level 8. Code sample stripped of irrelevant logic: ```php public function...
When following a number of tutorials online including the [examples](https://github.com/drupalprojects/examples/tree/8.x-1.x/plugin_type_example) module, and running the code through phpstan-drupal, we get the following error for Plugin definitions: Line 28 Plugin definitions cannot...
#342 #344 added stubs for field types which are always available with Drupal. It'd be great if field types in Drupal in optional [non-test] modules were also hinted eg text.module:...
Part of https://github.com/mglaman/phpstan-drupal/issues/359. See [PHPStan documentation on Stub Files](https://phpstan.org/user-guide/stub-files). Create stub files for the following field types in a `stubs/Drupal/user` directory: - `\Drupal\user\StatusItem` - `\Drupal\user\TimeZoneItem` - `\Drupal\user\UserNameItem` These do not...
Part of https://github.com/mglaman/phpstan-drupal/issues/359. See [PHPStan documentation on Stub Files](https://phpstan.org/user-guide/stub-files). Create stub files for the following field types in a `stubs/Drupal/telephone/Plugin/Field/FieldType` directory: - `\Drupal\telephone\Plugin\Field\FieldType\TelephoneItem` Add test cases to https://github.com/mglaman/phpstan-drupal/blob/main/tests/src/Type/data/field-types.php.
Part of https://github.com/mglaman/phpstan-drupal/issues/359. See [PHPStan documentation on Stub Files](https://phpstan.org/user-guide/stub-files). Create stub files for the following field types in a `stubs/Drupal/path/Plugin/Field/FieldType` directory: - `\Drupal\path\Plugin\Field\FieldType\PathItem` Add test cases to https://github.com/mglaman/phpstan-drupal/blob/main/tests/src/Type/data/field-types.php.