Skip to content

chore: align PHP coding standards#7

Merged
rbcorrales merged 1 commit into
mainfrom
chore/php-coding-standards
May 18, 2026
Merged

chore: align PHP coding standards#7
rbcorrales merged 1 commit into
mainfrom
chore/php-coding-standards

Conversation

@rbcorrales
Copy link
Copy Markdown
Member

Summary

  1. Adds PHPCompatibilityWP to the existing WordPress and VIP PHPCS ruleset.
  2. Limits PHPCS to PHP files and excludes VIP JavaScript sniffs from this PHP plugin ruleset.
  3. Adds the missing PHPCS installer and PHPCompatibilityWP Composer dev dependencies.
  4. Applies PHPCBF mechanical formatting across the existing plugin PHP files.
  5. Updates PHPUnit within the existing 9.x constraint to clear the Composer audit advisory.

Notes

This is a baseline cleanup PR, not full standards compliance. PHPCBF fixed 25,059 violations, but PHPCS still reports semantic follow up work around escaping, nonces, prepared SQL, direct database access, Yoda conditions, translator comments, and docblocks.

Verification

  1. ./vendor/bin/phpcbf --standard=phpcs.xml.dist
  2. find includes admin -name '*.php' -print0 | xargs -0 -n 1 php -l
  3. php -l wpvdb.php
  4. git diff --check
  5. ./vendor/bin/phpcs --standard=phpcs.xml.dist --report=summary
  6. composer audit --format=plain

Co-authored-by: Codex <noreply@openai.com>
@rbcorrales rbcorrales requested a review from Copilot May 18, 2026 21:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@rbcorrales rbcorrales merged commit 782dd2a into main May 18, 2026
@rbcorrales rbcorrales deleted the chore/php-coding-standards branch May 27, 2026 21:48
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