Skip to content

Update PHP lint tooling and resolve coding standards findings - #775

Merged
obenland merged 20 commits into
trunkfrom
chore/phpcs-tooling
Sep 17, 2026
Merged

obenland merged 20 commits into
trunkfrom
chore/phpcs-tooling

Conversation

@obenland

@obenland obenland commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Updates the PHP lint toolchain, enables warnings, and runs full-repository PHPCS in CI. PHP findings are reported without blocking CI. Commits separate tooling, PHPCBF formatting, and manual fixes.

Changes

  • Track the repository PHPCS configuration, update Composer tooling and PHPCompatibility packages, and use PHP 8.4 for host tooling while keeping WordPress tests on PHP 8.2.
  • Exclude WordPress.DB.DirectDatabaseQuery globally, matching wordpress.org, while retaining SQL preparation checks.
  • Resolve the existing lint findings with manual escaping, input handling, documentation, and narrowly justified exceptions that preserve identifiers and public APIs.
  • Prepare bulk session-deletion values and preserve numeric query-filter selections, with regression tests.
  • Preserve the existing Meetup OAuth callback protocol and authorization URLs with a targeted PHPCS exception.

This PR is self-contained and requires no WordCamp changes.

Validation

  • Full PHPCS: 83 files, zero errors or warnings.
  • PHPUnit: 32 tests, 107 assertions passed.
  • Composer validation, actionlint, and diff whitespace checks passed.
  • Replayed noninteractive update-configs; the tracked PHPCS config remains unchanged.

Hosted CI results are available in the PR checks. Live service behavior was not tested locally.

Copilot AI lite review requested due to automatic review settings September 15, 2026 21:04

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 reached their quota limit.

wporg-repo-tools now requires phpcompatibility/phpcompatibility-wp
itself, which pulls php-compatibility and phpcompatibility-paragonie
with it, so this project no longer needs to list any of the three.

Removing them also removes the per-constraint `@alpha` flags that were
the only reason resolution worked without root stability settings. The
package requires `^3.0@alpha` transitively, and Composer reads
`minimum-stability` and `prefer-stable` only from the root, so both have
to be declared here for the alpha to resolve.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@obenland
obenland merged commit d7a49e6 into trunk Sep 17, 2026
2 checks passed
@obenland
obenland deleted the chore/phpcs-tooling branch September 17, 2026 13:16
bor0 added a commit that referenced this pull request Sep 17, 2026
Trunk now carries the PHP 8.2 test environment (#770) and the coding-standards
pass (#775), which annotated the `$_GET` read this branch removes. Resolved by
keeping the caller-supplied code and dropping the suppression it no longer
needs, and by taking trunk's version of the encryption tests wholesale.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013V9sVz7atsstmmD8gN39Df
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