-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon
39 lines (34 loc) · 1.61 KB
/
phpstan.neon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
includes:
- phpstan-baseline.neon
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
- vendor/spaze/phpstan-disallowed-calls/disallowed-dangerous-calls.neon
- vendor/spaze/phpstan-disallowed-calls/disallowed-execution-calls.neon
- vendor/spaze/phpstan-disallowed-calls/disallowed-insecure-calls.neon
parameters:
level: 1
customRulesetUsed: true
reportUnmatchedIgnoredErrors: false
checkFunctionArgumentTypes: true
drupal:
rules:
classExtendsInternalClassRule: false
strictRules:
allRules: false
strictCalls: true
# Exclude microsite project submodules from phpstan checks on the main project.
excludePaths:
- web/modules/contrib/localgov_alert_banner/modules/group_alert_banner/*
# 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#'
# Disable PHPUnit dynamic call until core decision - https://www.drupal.org/project/drupal/issues/3029358
- '#Dynamic call to static method PHPUnit\\Framework\\.*#'
# FIXME: ignore Drupal 12 deprecations
- '#Class Drupal\\localgov_forms\\Element\\AddressLookupElement extends deprecated class Drupal\\Core\\Render\\Element\\FormElement#'
- '#Call to deprecated method renderPlain\(\)#'
- '#Call to deprecated method rebuildThemeData\(\)#'