From 1d0aa3e91f21144497c8e43b7f7eb9e0615ba86b Mon Sep 17 00:00:00 2001 From: wppoland Date: Sun, 13 Sep 2026 09:46:13 +0200 Subject: [PATCH] Build/Test Tools: Update PHPStan baseline for WP_Query::$posts assignment. In r63607, query variable defaults and post properties were updated to use the null coalescing assignment operator (`??=`) in `WP_Query`. This reduced the occurrences of `assign.propertyType` for `WP_Query::$posts` from 2 to 1 in `src/wp-includes/class-wp-query.php`. This commit updates `tests/phpstan/baselines/assign.propertyType.neon` accordingly so PHPStan CI checks pass on trunk and PRs. Follow-up to [63607]. Props wppoland. See #65823. --- tests/phpstan/baselines/assign.propertyType.neon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpstan/baselines/assign.propertyType.neon b/tests/phpstan/baselines/assign.propertyType.neon index 97c3032b91309..be2401759f2c8 100644 --- a/tests/phpstan/baselines/assign.propertyType.neon +++ b/tests/phpstan/baselines/assign.propertyType.neon @@ -36,12 +36,12 @@ parameters: - message: '#^Property WP_Query\:\:\$posts \(array\\|null\) does not accept list\\|null\.$#' identifier: assign.propertyType - count: 2 + count: 1 path: ../../../src/wp-includes/class-wp-query.php - message: '#^Property WP_Query\:\:\$posts \(array\\|null\) does not accept list\\.$#' identifier: assign.propertyType - count: 2 + count: 1 path: ../../../src/wp-includes/class-wp-query.php - message: '#^Property WP_Rewrite\:\:\$rules \(array\\) does not accept string\.$#'