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

Extension for PHPStan to allow analysis of Drupal code.

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

# Bug report After upgrading to PHPStan 2, errors related to the `accessCheck()` method occurred. A similar problem was previously solved in #508. Versions used: - phpstan/phpstan `2.1.4` - mglaman/phpstan-drupal...

bug

# Bug report PHPUnit's https://github.com/sebastianbergmann/phpunit/pull/6341 introduced a subtle change in the _meaning_ of the `#[IgnoreDeprecations]` attribute in PHPUnit 12.4.0. If before having `#[IgnoreDeprecations]` on a class/method could mean the entire...

Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. Release notes Sourced from actions/checkout's releases. v6.0.0 What's Changed Update README to include Node.js 24 support details and requirements by @​salmanmkc in actions/checkout#2248 Persist...

github_actions
dependencies

# Feature request We have ClassExtendsInternalClassRule, but there should be more rules that act like PHPStan's `@api` rules: https://github.com/phpstan/phpstan-src/tree/2.1.x/src/Rules/Api So if calling a method, accessing a constant, etc from something...

enhancement

# Feature request Hooks are not typed and we have no way of knowing what hooks are available in the system, since hooks are not defined and only arbitrarily invoked....

enhancement

Running phpstan against core with `checkFunctionArgumentTypes: true` results in several instances of this error: ``` Parameter #1 $offset of method Drupal\Core\TypedData\Plugin\DataType\ItemList::offsetExists() expects int, Drupal\Core\TypedData\Plugin\DataType\TKey given. ``` Mostly in `ComputedItemListTrait`, but...

# Bug report Basically, this extension narrows the type exactly to the argument type. I think it should either be removed or allowed to be disabled. ### Code snippet that...

bug

# Bug report In my project (currently on Drupal 10.5.1), I'm adding an extra parameter in `getForm()` like this: ``` $this->formBuilder->getForm(AccountLoginForm::class, ['param_here' => 'value_here']); ``` Then in `AccountLoginForm.php`, I have...

bug

# Bug report Slightly related to the conversation in https://github.com/phpstan/phpstan/issues/6562. PHPstan Drupal currently warns about readonly properties are not supported by DependencySerializationTrait, but that is not necessarily true. Using those...

bug