From 96a4df7f6c11b77f956f808d8f4b7e074ecffa11 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 26 Aug 2026 06:43:10 +0000 Subject: [PATCH] Exclude the wp-compat false positive from the PHPStan config The johnbillion/wp-compat extension that comes with wp-cli-tests checks every WordPress symbol against the WordPress 4.9 baseline that wp-cli-tests configures. It reported a single error, and it is a false positive: WordPress 6.0 merely formalized the already documented `...$args` parameter of `apply_filters()` by adding it to the function signature, so passing `$package`, `$this` and `$hook_extra` to `upgrader_pre_download` has always worked. Co-authored-by: Pascal Birchler --- phpstan.neon.dist | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index ecb0735b..fa01e11b 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -18,3 +18,15 @@ parameters: switchConditionsMatchingType: true ignoreErrors: - identifier: missingType.return + + # johnbillion/wp-compat checks every WordPress symbol against the WordPress 4.9 + # baseline that wp-cli-tests configures, and reports anything newer. + + # 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, so passing `$package`, `$this` and + # `$hook_extra` to `upgrader_pre_download` has always worked. The identifier already + # names one specific parameter of one specific function. + - + identifier: WPCompat.parameterNotAvailable.applyfilters.args + path: src/WP_CLI/LanguagePackUpgrader.php