Skip to content

chore: add PHPStan static analysis - #63

Merged
superdav42 merged 1 commit into
masterfrom
chore/phpstan-static-analysis
Sep 23, 2026
Merged

superdav42 merged 1 commit into
masterfrom
chore/phpstan-static-analysis

Conversation

@superdav42

Copy link
Copy Markdown
Collaborator

Summary

  • add PHPStan with WordPress and WooCommerce type information
  • establish a clean level 3 static-analysis baseline without generated suppressions
  • run PHPStan alongside PHPCS in the code-quality workflow
  • fix callback declarations, PHPDoc types, and small defects exposed by static analysis

Context

This follows merged PR #59. The PHPStan work was completed after that PR merged, so it is delivered separately here.

Implementation

  • Analyze includes/ and the plugin entry points using szepeviktor/phpstan-wordpress.
  • Provide a small scan-only stub for functions supplied by the optional Akismet plugin.
  • Add composer phpstan and include PHPStan in composer lint.
  • Keep PHPCS and PHPStan in one CI job to reuse the Composer installation.

Verification

  • composer validate --strict
  • composer lint (PHPCS: 0 errors; PHPStan level 3: 0 errors)
  • npm run lint (0 errors; existing warnings reported)
  • npm run build
  • git diff --check origin/master..HEAD

aidevops.sh v3.34.13 plugin for OpenCode v1.18.31 with gpt-5.6-sol

@superdav42
superdav42 merged commit 6ef3109 into master Sep 23, 2026
2 checks passed
@superdav42

Copy link
Copy Markdown
Collaborator Author

Summary

  • add PHPStan with WordPress and WooCommerce type information
  • establish a clean level 3 static-analysis baseline without generated suppressions
  • run PHPStan alongside PHPCS in the code-quality workflow
  • fix callback declarations, PHPDoc types, and small defects exposed by static analysis

Context

This follows merged PR #59. The PHPStan work was completed after that PR merged, so it is delivered separately here.

Implementation

  • Analyze includes/ and the plugin entry points using szepeviktor/phpstan-wordpress.
  • Provide a small scan-only stub for functions supplied by the optional Akismet plugin.
  • Add composer phpstan and include PHPStan in composer lint.
  • Keep PHPCS and PHPStan in one CI job to reuse the Composer installation.

Verification

  • composer validate --strict
  • composer lint (PHPCS: 0 errors; PHPStan level 3: 0 errors)
  • npm run lint (0 errors; existing warnings reported)
  • npm run build
  • git diff --check origin/master..HEAD

aidevops.sh v3.34.13 plugin for OpenCode v1.18.31 with gpt-5.6-sol


Merged via PR #63 to master.
Merged by deterministic merge pass (pulse-wrapper.sh).

@superdav42 superdav42 added the review-feedback-scanned Merged PR already scanned for quality feedback label Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-feedback-scanned Merged PR already scanned for quality feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant