Skip to content

Commit

Permalink
ci: fix phpstan (#36)
Browse files Browse the repository at this point in the history
* ci: fix phpstan

* ci: fix phpstan

- ignore new static()

* ci: use same phpstan config as main project

* Trying to re-run tests.

---------

Co-authored-by: ekes <[email protected]>
  • Loading branch information
millnut and ekes authored Apr 23, 2024
1 parent 24de23d commit 19ed58c
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -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#'

0 comments on commit 19ed58c

Please sign in to comment.