From 0a6e6251b7192584dd0206ae4d167e9dd41610a8 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 25 Aug 2026 20:55:53 +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 extra arguments to `upgrader_pre_download` has always worked. Co-authored-by: Pascal Birchler --- phpstan.neon.dist | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index c8c4a91f..8ca70b15 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -12,3 +12,13 @@ parameters: - identifier: missingType.iterableValue - identifier: missingType.parameter - 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. + - + identifier: WPCompat.parameterNotAvailable.applyfilters.args + path: src/WP_CLI/Core/CoreUpgrader.php