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

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/Plugin/Field/FieldType` directory: - `\Drupal\datetime\Plugin\Field\FieldType\DateTimeItem` Add test cases to https://github.com/mglaman/phpstan-drupal/blob/main/tests/src/Type/data/field-types.php.

enhancement
good first issue
stub files

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/comment/Plugin/Field/FieldType` directory: - `\Drupal\comment\Plugin\Field\FieldType\CommentItem` Add test cases to https://github.com/mglaman/phpstan-drupal/blob/main/tests/src/Type/data/field-types.php.

enhancement
good first issue
stub files

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/image/Plugin/Field/FieldType` directory: * `\Drupal\image\Plugin\Field\FieldType\ImageItem` Add test cases to https://github.com/mglaman/phpstan-drupal/blob/main/tests/src/Type/data/field-types.php.

enhancement
good first issue
stub files

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/options/Plugin/Field/FieldType` directory: - `\Drupal\options\Plugin\Field\FieldType\ListItemBase` - `\Drupal\options\Plugin\Field\FieldType\ListStringItem` - `\Drupal\options\Plugin\Field\FieldType\ListIntegerItem` - `\Drupal\options\Plugin\Field\FieldType\ListFloatItem` Add...

enhancement
good first issue
stub files

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/text/Plugin/Field/FieldType` directory: * `\Drupal\text\Plugin\Field\FieldType\TextItemBase` * `value` property as `string` * `format`...

enhancement
good first issue
stub files

\mglaman\PHPStanDrupal\Drupal\EntityData::getClassType should return an \Drupal\Core\Entity\EntityInterface object type, not null. \mglaman\PHPStanDrupal\Drupal\EntityData::getStorageType should default to \Drupal\Core\Entity\EntityStorageInterface not null ``` public function getClassType(): ObjectType { return $this->className === null ? new ObjectType(EntityInterface::class) :...

reviewing some warnings I found a false positive from the plugin manager cache rule. The triggering code looks something like this: ``` /** * Constructs a MagicPluginManager object. * *...

Currently, this extension loads _all_ available modules. In reality, we should be allowed to limit the scope of this. This would require moving the bootstrap process into the container somehow,...

enhancement

The one-line static-call seems to not be handled yet: `Drupal::moduleHandler()->loadInclude('locale', 'translation.inc');` When assigning `\Drupal::moduleHandler()` to a variable first works fine. Related to #166.

bug

Deprecated in favour of ContentEntityTypeInterface::getRevisionMetadataKey() https://www.drupal.org/node/2831499

needs details