You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit acd3beb
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: phpstan.neon.dist
+92Lines changed: 92 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -19,3 +19,95 @@ parameters:
19
19
- identifier: missingType.property
20
20
- identifier: missingType.parameter
21
21
- identifier: missingType.return
22
+
23
+
24
+
# johnbillion/wp-compat checks every WordPress symbol against the WordPress 4.9
25
+
# baseline that wp-cli-tests configures. It only recognizes function_exists() and
26
+
# method_exists() guards, so it cannot see the `before_invoke` version checks in
27
+
# entity-command.php or the polyfills in src/Compat/, and reports those as errors.
28
+
#
29
+
# Every entry below matches on the message as well as the identifier, so that a call
30
+
# to something introduced later than the version a command is gated on still gets
31
+
# reported rather than swallowed by a file-wide ignore.
32
+
33
+
# `WP_Block_Processor` and its dependencies are polyfilled in src/Compat/ and loaded
34
+
# on demand through `BlockProcessorLoader::load()`, so they are available on every
35
+
# supported WordPress version, not just 6.9+.
36
+
-
37
+
identifier: WPCompat.methodNotAvailable
38
+
message: '#^WP_Block_Processor::(allocate_and_return_parsed_attributes|extract_full_block_and_advance|get_block_type|get_delimiter_type|get_depth|get_span|next_block)\(\) is only available since WordPress version 6\.9\.0\.$#'
39
+
path: src/Block_Processor_Helper.php
40
+
41
+
# `wp font collection|face|family` aborts on WordPress < 6.5 via `before_invoke`.
42
+
-
43
+
identifier: WPCompat.methodNotAvailable
44
+
message: '#^(WP_Font_Collection::get_data|WP_Font_Library::(get_font_collection|get_font_collections|get_instance))\(\) is only available since WordPress version 6\.5\.0\.$#'
45
+
paths:
46
+
- src/Font_Collection_Command.php
47
+
- src/Font_Family_Command.php
48
+
49
+
# `wp user application-password` aborts on WordPress < 5.6 via `before_invoke`.
50
+
-
51
+
identifier: WPCompat.methodNotAvailable
52
+
message: '#^WP_Application_Passwords::(create_new_application_password|delete_all_application_passwords|delete_application_password|get_user_application_password|get_user_application_passwords|record_application_password_usage|update_application_password)\(\) is only available since WordPress version 5\.6\.0\.$#'
53
+
path: src/User_Application_Password_Command.php
54
+
55
+
# The single WordPress 5.7 method is additionally behind a `wp_version_compare()`
56
+
# check in `application_name_exists_for_user()`, which reimplements it for 5.6.
57
+
-
58
+
identifier: WPCompat.methodNotAvailable
59
+
message: '#^WP_Application_Passwords::application_name_exists_for_user\(\) is only available since WordPress version 5\.7\.0\.$#'
60
+
path: src/User_Application_Password_Command.php
61
+
62
+
# `wp user privacy-request` aborts on WordPress < 4.9.6 via `before_invoke`.
63
+
-
64
+
identifier: WPCompat.functionNotAvailable
65
+
message: '#^(_wp_privacy_completed_request|wp_create_user_request|wp_get_user_request_data|wp_privacy_exports_dir|wp_privacy_generate_personal_data_export_file|wp_send_user_request)\(\) is only available since WordPress version 4\.9\.6\.$#'
66
+
path: src/User_Privacy_Request_Command.php
67
+
68
+
# `wp site meta` aborts via `before_invoke` unless `is_site_meta_supported()`
69
+
# exists, which is the WordPress 5.1 function that introduced site meta support
70
+
# along with the `*_site_meta()` functions used here.
71
+
-
72
+
identifier: WPCompat.functionNotAvailable
73
+
message: '#^(add_site_meta|delete_site_meta|get_site_meta|update_site_meta)\(\) is only available since WordPress version 5\.1\.0\.$#'
74
+
path: src/Site_Meta_Command.php
75
+
76
+
# `wp post block` aborts on WordPress < 5.0 via `before_invoke`. `serialize_blocks()`
77
+
# is WordPress 5.3.1+ and is guarded separately in the mutating subcommands, so it
78
+
# must keep being reported if that guard ever goes away.
79
+
-
80
+
identifier: WPCompat.functionNotAvailable
81
+
message: '#^(has_blocks|parse_blocks|render_block)\(\) is only available since WordPress version 5\.0\.0\.$#'
82
+
path: src/Post_Block_Command.php
83
+
84
+
# Only the uppercase `'ID'` alias for the `$field` parameter of `get_term_by()`
85
+
# is WordPress 5.5+. These call sites pass `'id'`, `'term_id'` or `'slug'`, all
0 commit comments