Skip to content

Repair wp/5.8 branch Actions: Run PHP coding standards on the runner instead of inside wp-env - #84440

Open
desrosj wants to merge 2 commits into
fix-actions-5.8/remove-phpunit-watcherfrom
fix-actions-5.8/run-phpcs-on-runner
Open

desrosj wants to merge 2 commits into
fix-actions-5.8/remove-phpunit-watcherfrom
fix-actions-5.8/run-phpcs-on-runner

Conversation

@desrosj

@desrosj desrosj commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Part of #82935.

What?

Moves PHP coding standards checks (phpcs) out of wp-env into a new phpcs job in unit-test.yml. The job runs on the runner at PHP 7.4, reports violations as annotations with cs2pr, and checks that no version-controlled files changed. It passes --runtime-set ignore_warnings_on_exit 1, as this branch's composer run-script lint does. The .cache/.gitkeep, .gitignore and phpcs.xml.dist changes add the PHPCS scan cache. It also sets timeout-minutes: 20 on the new phpcs job, like the other jobs got in #84491.

In the PHPUnit job, the Running lint check step is replaced by an Install Composer dependencies step (npm run wp-env run composer 'install --no-interaction').

Why?

Coding standards checks don't depend on the PHP version being tested. Inside wp-env they only ran after the environment started, they repeated on every leg of the PHP matrix added in #84438, and violations showed up as container logs instead of annotations on the diff.

The lint step's prelint-php hook was also the only thing that installed Composer dependencies for PHPUnit, and phpunit/bootstrap.php requires vendor/autoload.php. The new step keeps that install.

The job uses PHP 7.4 because the PHP_CodeSniffer and WPCS releases this branch depends on emit deprecation notices on PHP 8.4 and newer that abort the scan.

How?

Ports the phpcs job from #46510 (9ee17a7).

Both Composer installs fail until #84441, directly above, adds config.allow-plugins and config.platform.php. With #84441 applied, phpcs passes.

Use of AI Tools

This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.

🤖 Generated with Claude Code

@desrosj desrosj added the [Type] Build Tooling Issues or PRs related to build tooling label Oct 9, 2026
@desrosj desrosj self-assigned this Oct 9, 2026
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c4989da4-8dc6-49b4-a82f-e7fc45bc5581

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@desrosj
desrosj added this pull request to stack #84460 October 9, 2026 18:29
@desrosj
desrosj removed this pull request from stack #84460 October 10, 2026 00:22
@desrosj
desrosj changed the base branch from fix-actions-5.8/remove-phpunit-watcher to wp/5.8 October 10, 2026 00:22
@desrosj
desrosj force-pushed the fix-actions-5.8/run-phpcs-on-runner branch from e310483 to 9c8c116 Compare October 10, 2026 00:24
@desrosj
desrosj changed the base branch from wp/5.8 to fix-actions-5.8/remove-phpunit-watcher October 10, 2026 00:26
@desrosj
desrosj added this pull request to stack #84492 October 10, 2026 00:27
@desrosj
desrosj marked this pull request as ready for review October 13, 2026 01:07
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: desrosj <desrosj@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@desrosj
desrosj removed this pull request from stack #84492 October 16, 2026 01:21
@desrosj
desrosj added this pull request to stack #84874 October 16, 2026 01:21
@desrosj
desrosj removed this pull request from stack #84874 October 16, 2026 15:49
@desrosj
desrosj added this pull request to stack #84943 October 16, 2026 15:50
@desrosj
desrosj force-pushed the fix-actions-5.8/run-phpcs-on-runner branch from 9c8c116 to 5feef73 Compare October 19, 2026 17:09
@desrosj
desrosj removed this pull request from stack #84943 October 21, 2026 19:47
@desrosj
desrosj added this pull request to stack #85352 October 21, 2026 19:48
@desrosj
desrosj force-pushed the fix-actions-5.8/run-phpcs-on-runner branch from 5feef73 to 9ce63a2 Compare October 22, 2026 18:35

@ntsekouras ntsekouras left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, thanks!

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

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants