diff --git a/phpstan.neon b/phpstan.neon index 8168a38..aa98928 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,9 +1,13 @@ parameters: - customRulesetUsed: true - reportUnmatchedIgnoredErrors: false - # Ignore phpstan-drupal extension's rules. - ignoreErrors: - - '#\Drupal calls should be avoided in classes, use dependency injection instead#' - - '#Plugin definitions cannot be altered.#' - - '#Missing cache backend declaration for performance.#' - - '#Plugin manager has cache backend specified but does not declare cache tags.#' + # we don't set a level so that we check deprecations only, and + # not to highlight unknown classes which are from composer suggestions. + customRulesetUsed: true + reportUnmatchedIgnoredErrors: false + # Ignore phpstan-drupal extension's rules. + ignoreErrors: + - '#\Drupal calls should be avoided in classes, use dependency injection instead#' + - '#Plugin definitions cannot be altered.#' + - '#Missing cache backend declaration for performance.#' + - '#Plugin manager has cache backend specified but does not declare cache tags.#' + # new static() is a best practice in Drupal, so we cannot fix that. + - '#^Unsafe usage of new static#'