Skip to content

build(deps-dev): adopt rtcamp/wp-phpstan 2 and run PHPStan level 8 in CI - #103

Open
Adi-ty wants to merge 1 commit into
mainfrom
chore/phpstan-level-8
Open

Adi-ty wants to merge 1 commit into
mainfrom
chore/phpstan-level-8

Conversation

@Adi-ty

@Adi-ty Adi-ty commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Description

Updates rtcamp/wp-phpstan to 2.0 (PHPStan level 8) and runs PHPStan in CI.

Technical Details

  • Fixed the 13 level-8 errors in inc/Modules/ (label fallbacks, typed array @params), with no ignores.
  • enable-phpstan: true in CI.
  • phpstan.neon.dist also analyses the main plugin file, sets dynamicConstantNames, and includes an empty baseline (kept out of the release zip).
  • Removed the unused php-stubs/wp-cli-stubs
  • composer.lock updated with composer update rtcamp/wp-phpstan php-stubs/wp-cli-stubs; no other packages change.

Checklist

  • composer phpstan and composer lint pass
  • PHPUnit (runs in CI)

Screenshots

To-do

  • Before the php-stubs/wordpress-stubs 7.x bump, AssetLoader::handle() in rtcamp/wp-primitives needs a non-empty-string return type.

@Adi-ty
Adi-ty marked this pull request as ready for review December 3, 2026 05:27
Copilot AI balanced review requested due to automatic review settings December 3, 2026 05:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

This branch has not been deployed

No deployments
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