phpstan-drupal
phpstan-drupal copied to clipboard
Extension for PHPStan to allow analysis of Drupal code.
(I found/tested this issue with drupal-check 1.4.0) I wanted to write type-definitions for a custom FieldItem class, so I can use ``$item->my_custom_field_property`` properties in my code. I read in https://github.com/mglaman/phpstan-drupal/issues/359...
For hook implementations in contrib projects, drupal-check v1.4.0 reports Function filemime_file_mimetype_mapping_alter() has parameter $mapping with no value type specified in iterable type array. 💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type But if you do...
Like class-name type, but is used to represent an entity type ID.
Fixes #343
I've encountered a minor issue with the container service resolution returning an incorrect interface when loading the keyvalue.expirable service through the container. This can be duplicated using just core files...
https://www.drupal.org/node/3217966
Kind of a dupe of https://github.com/mglaman/phpstan-drupal/issues/295 but is also a different approach. With the extension installer there is no way to split the configuration of "basic setup" and then "additional...
In EntityQueryDynamicReturnTypeExtension we check for various instances. If any fail, we could try what phpstan-doctrine does by using a `while` loop to find the root. See https://github.com/phpstan/phpstan-doctrine/blob/1.3.x/src/Type/Doctrine/DBAL/QueryBuilder/QueryBuilderExecuteMethodExtension.php#L46
create stub file language.module field type stubs #368