Skip to content

Build/Test Tools: Update PHPStan baseline for WP_Query::$posts assignment - #13504

Open
wppoland wants to merge 1 commit into
WordPress:trunkfrom
wppoland:trac/65823-phpstan-baseline
Open

Build/Test Tools: Update PHPStan baseline for WP_Query::$posts assignment#13504
wppoland wants to merge 1 commit into
WordPress:trunkfrom
wppoland:trac/65823-phpstan-baseline

Conversation

@wppoland

Copy link
Copy Markdown

In [63607] (ticket #65823), query variable defaults and post properties were updated to use the null coalescing assignment operator (??=) in WP_Query.

This change reduced the occurrence count of assign.propertyType for WP_Query::$posts in src/wp-includes/class-wp-query.php from 2 to 1. As a result, PHPStan CI workflows on trunk and open PRs fail at the Check whether the baselines need regenerating step.

This PR updates tests/phpstan/baselines/assign.propertyType.neon so PHPStan static analysis passes cleanly again.

Follow-up to [63607].
Trac ticket: https://core.trac.wordpress.org/ticket/65823

…ment.

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.
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props motylanogha.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant