Skip to content

Correct render binding PHPDoc type#641

Merged
swissspidy merged 1 commit into
wp-cli:mainfrom
ekamran:fix/render-binding-phpdoc
May 23, 2026
Merged

Correct render binding PHPDoc type#641
swissspidy merged 1 commit into
wp-cli:mainfrom
ekamran:fix/render-binding-phpdoc

Conversation

@ekamran

@ekamran ekamran commented May 23, 2026

Copy link
Copy Markdown
Contributor

Summary

This updates the PHPDoc for Handbook_Command::render() so it matches the data that is actually passed to the method.

The method renders Mustache templates, and the binding data can contain strings, booleans, and nested arrays. The old PHPDoc was too narrow, which made PHPStan fail on valid call sites.

Changes

  • Change the $binding type to array<string, mixed>.
  • Remove two PHPStan ignore comments that are no longer needed.

Verification

  • Ran composer test
  • Ran git diff --check

@ekamran ekamran requested a review from a team as a code owner May 23, 2026 16:04
@swissspidy swissspidy merged commit a15069c into wp-cli:main May 23, 2026
6 checks passed
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.

2 participants