Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,31 @@ parameters:
treatPhpDocTypesAsCertain: false
ignoreErrors:
- identifier: missingType.iterableValue

# 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 `wp_version_compare()` checks used
# throughout this command.

# WordPress 6.0 only formalized the already documented `...$args` parameter of
# `apply_filters()` by adding it to the function signature. Additional arguments
# were collected through `func_get_args()` before that. The two
# `intermediate_image_sizes_advanced` calls are already split across a
# `wp_version_compare()` check for exactly this reason.
-
identifier: WPCompat.parameterNotAvailable.applyfilters.args
path: src/Media_Command.php

# The WordPress 6.0 change to `wp_generate_attachment_metadata()` added the
# `$filesize` value to the *returned array*. The `$file` parameter itself has been
# there since WordPress 2.1.
-
identifier: WPCompat.parameterNotAvailable.wpgenerateattachmentmetadata.file
path: src/Media_Command.php

# `Media_Command::wp_get_registered_image_subsizes()` only calls its WordPress 5.3
# namesake behind a `wp_version_compare()` check, and reimplements it otherwise.
-
identifier: WPCompat.functionNotAvailable
message: '#^wp_get_registered_image_subsizes\(\) is only available since WordPress version 5\.3\.0\.$#'
path: src/Media_Command.php
Comment thread
swissspidy marked this conversation as resolved.