Repository navigation
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
115 lines (109 loc) · 4.83 KB
/
Copy pathphpstan.neon.dist
File metadata and controls
115 lines (109 loc) · 4.83 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
parameters:
level: 9
paths:
- src
- block-command.php
scanDirectories:
- vendor/wp-cli/wp-cli/php
scanFiles:
- vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
treatPhpDocTypesAsCertain: false
ignoreErrors:
# Standard WP-CLI ignores (same as entity-command)
- identifier: missingType.iterableValue
- identifier: missingType.return
# WordPress Block registry classes not yet in stubs
-
message: '#on an unknown class WP_Block_Type_Registry#'
reportUnmatched: false
-
message: '#on an unknown class WP_Block_Patterns_Registry#'
reportUnmatched: false
-
message: '#on an unknown class WP_Block_Pattern_Categories_Registry#'
reportUnmatched: false
-
message: '#on an unknown class WP_Block_Styles_Registry#'
reportUnmatched: false
-
message: '#on an unknown class WP_Block_Bindings_Registry#'
reportUnmatched: false
-
message: '#on an unknown class WP_Block_Bindings_Source#'
reportUnmatched: false
-
message: '#on an unknown class WP_Block_Template#'
reportUnmatched: false
-
message: '#unknown class WP_CLI\\Block\\WP_Block_Bindings_Source#'
reportUnmatched: false
-
message: '#unknown class WP_CLI\\Block\\WP_Block_Template#'
reportUnmatched: false
-
message: '#has invalid type WP_CLI\\Block\\WP_Block_Bindings_Source#'
reportUnmatched: false
-
message: '#has invalid type WP_CLI\\Block\\WP_Block_Template#'
reportUnmatched: false
-
message: '#expects WP_CLI\\Block\\WP_Block_Bindings_Source#'
reportUnmatched: false
-
message: '#expects WP_CLI\\Block\\WP_Block_Template#'
reportUnmatched: false
# Spyc YAML dumper
-
message: '#Call to static method YAMLDump\(\) on an unknown class Spyc#'
reportUnmatched: false
# WP_CLI\Formatter::$format is not type-hinted in WP-CLI core
-
message: '#Access to an undefined property WP_CLI\\Formatter::\$format#'
reportUnmatched: false
# WP_Block_Type properties not fully typed in stubs
-
message: '#Access to an undefined property WP_Block_Type::#'
reportUnmatched: false
# johnbillion/wp-compat checks every WordPress symbol against the WordPress 4.9
# baseline that wp-cli-tests configures. It only recognizes function_exists() and
# method_exists() guards, so it cannot see the per-command `before_invoke` checks in
# block-command.php, and reports every block API symbol as an error.
#
# Each entry below matches on the message as well as the identifier, pinning the
# version that the corresponding command is gated on, so a call to anything newer
# than that gate still gets reported rather than swallowed by a file-wide ignore.
# `wp block type` is gated on WordPress 5.0.
-
identifier: WPCompat.methodNotAvailable
message: '#^(WP_Block_Type::is_dynamic|WP_Block_Type_Registry::(get_all_registered|get_instance|get_registered|is_registered))\(\) is only available since WordPress version 5\.0\.0\.$#'
path: src/Block_Type_Command.php
# `wp block synced-pattern` is gated on WordPress 5.0.
-
identifier: WPCompat.functionNotAvailable
message: '#^parse_blocks\(\) is only available since WordPress version 5\.0\.0\.$#'
path: src/Block_Synced_Pattern_Command.php
# `wp block style` is gated on WordPress 5.3.
-
identifier: WPCompat.methodNotAvailable
message: '#^WP_Block_Styles_Registry::(get_all_registered|get_instance|get_registered_styles_for_block)\(\) is only available since WordPress version 5\.3\.0\.$#'
path: src/Block_Style_Command.php
# `wp block pattern` and `wp block pattern-category` are gated on WordPress 5.5.
-
identifier: WPCompat.methodNotAvailable
message: '#^WP_Block_Patterns_Registry::(get_all_registered|get_instance|get_registered)\(\) is only available since WordPress version 5\.5\.0\.$#'
path: src/Block_Pattern_Command.php
-
identifier: WPCompat.methodNotAvailable
message: '#^WP_Block_Pattern_Categories_Registry::(get_all_registered|get_instance|get_registered)\(\) is only available since WordPress version 5\.5\.0\.$#'
path: src/Block_Pattern_Category_Command.php
# `wp block template` is gated on WordPress 5.9, so the WordPress 5.8 template
# functions it calls are comfortably covered.
-
identifier: WPCompat.functionNotAvailable
message: '#^get_block_templates?\(\) is only available since WordPress version 5\.8\.0\.$#'
path: src/Block_Template_Command.php
# `wp block binding` is gated on WordPress 6.5.
-
identifier: WPCompat.functionNotAvailable
message: '#^(get_all_registered_block_bindings_sources|get_block_bindings_source)\(\) is only available since WordPress version 6\.5\.0\.$#'
path: src/Block_Binding_Command.php