From d51e7d3337bf9ad0750d078f64e38203faebfe75 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sun, 30 Aug 2026 07:15:21 +0000 Subject: [PATCH] Remove obsolete wp_generate_attachment_metadata() PHPStan ignore entry johnbillion/wp-compat 2.0.1 no longer reports the `$file` parameter of wp_generate_attachment_metadata() as version-gated, so the ignore entry working around that false positive is now unmatched and fails the analysis. --- phpstan.neon.dist | 7 ------- 1 file changed, 7 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index e32bc2f5..2b0385fa 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -25,13 +25,6 @@ parameters: 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. -