Skip to content

Instantly share code, notes, and snippets.

@vkechagias
Last active February 7, 2019 15:42
Show Gist options
  • Save vkechagias/05e8388734c78503cff9d5ea4e1acc19 to your computer and use it in GitHub Desktop.
Save vkechagias/05e8388734c78503cff9d5ea4e1acc19 to your computer and use it in GitHub Desktop.
Sample phpstan.neon file to use when checking for Drupal 8 deprecated functions
parameters:
customRulesetUsed: true
reportUnmatchedIgnoredErrors: false
# Exclude directories that you may need to
excludes_analyse:
- themes/custom/scholarly/js/revolution
# 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.#'
includes:
- vendor/mglaman/phpstan-drupal/extension.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment