phpstan-drupal
phpstan-drupal copied to clipboard
Extension for PHPStan to allow analysis of Drupal code.
# Bug report On ^1.2 version, decorating a service using autowiring feature without explicit `class` for decorator, leads to an error: ``` [19-Dec-2023 10:55:19 UTC] PHP Warning: Undefined array key...
# Feature request See: - https://www.drupal.org/project/drupal/issues/3162827 - https://www.drupal.org/project/drupal/issues/3197773
# Feature request I had a custom class that extended Drupal\Core\Routing\RouteSubscriberBase. The old code had: ``` public static function getSubscribedEvents(): { ``` which was not compatible with D10 RouteSubscriberBase's ```...
# Bug report When an `EntityQuery::accessCheck()` call is chained with other methods it is not detected. This is similar to #437 but possibly requires a different fix. ### Code snippet...
# Bug report This is very similar to when \Drupal::entityQuery() is checked for accessCheck() ### Code snippet that reproduces the problem ```php $nodes = \Drupal::entityQueryAggregate('node')->execute(); ```
# Feature request Consequence of https://github.com/mglaman/phpstan-drupal/pull/610/ This caused ContainerInterace::has to be "always true", which may lead developers to removing `if ($container->has()` checks, causing actual bugs. Especially around conditional dependencies. Slack...
# Feature request GroupLegacyScope marks anything with `@group legacy` as deprecated. This should only work for test classes.
# Feature request When developers work with Yaml the autocomplete from IDEs often suggests `Yaml::parse` which will give them the Symfony component and they may be unaware of the existence...
# Bug report Fix the crash reported in #640 when loading `.api.php` files
# Feature request Added as part of https://github.com/mglaman/phpstan-drupal/pull/641, there needs to be documentation for using it and what the options are.