-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpstan.neon.dist
47 lines (47 loc) · 1.71 KB
/
phpstan.neon.dist
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
40
41
42
43
44
45
46
47
parameters:
level: 9
paths:
- media-experiments.php
- inc/
scanFiles:
- vendor/php-stubs/wordpress-tests-stubs/wordpress-tests-stubs.php
- tests/phpstan/filtered-functions.stub
- tests/phpstan/performance-lab.stub
# These are needed due config.platform.php being 7.4 in composer.json and wordpress-stubs not including polyfills.
# See <https://github.com/php-stubs/wordpress-stubs/issues/100>.
- vendor/phpstan/php-8-stubs/stubs/ext/standard/str_contains.php
- vendor/phpstan/php-8-stubs/stubs/ext/standard/str_starts_with.php
- vendor/phpstan/php-8-stubs/stubs/ext/standard/str_ends_with.php
bootstrapFiles:
- tests/phpstan/bootstrap.php
reportMaybesInMethodSignatures: false
featureToggles:
# Ignore errors related to the plugin not running from inside a WP environment, so paths like ABSPATH . WPINC don't resolve.
requireFileExists: false
WPCompat:
requiresAtLeast: '6.6'
strictRules:
disallowedConstructs: false
strictArrayFilter: false
ignoreErrors:
# TODO: Revisit ArrayAccess types in WP_REST_Request
# See https://github.com/php-stubs/wordpress-stubs/pull/66
# See https://github.com/phpstan/phpstan/issues/8549
-
message: "/^Cannot assign offset '.*' to WP_REST_Request/"
paths:
- inc/class-rest-attachments-controller.php
- inc/class-rest-upload-requests-controller.php
-
message: "/^WP_REST_Request<.*> does not accept/"
paths:
- inc/class-rest-attachments-controller.php
- inc/class-rest-upload-requests-controller.php
-
identifier: method.childParameterType
path: inc/class-rest-upload-requests-controller.php
-
identifier: offsetAccess.nonOffsetAccessible
path: inc/functions.php
includes:
- phar://phpstan.phar/conf/bleedingEdge.neon