Skip to content

Instantly share code, notes, and snippets.

@vkechagias
Last active Feb 7, 2019
Embed
What would you like to do?
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