Skip to content

Repair wp/5.8 branch Actions: Remove the spatie/phpunit-watcher dev dependency - #84439

Open
desrosj wants to merge 2 commits into
fix-actions-5.8/update-php-test-matrixfrom
fix-actions-5.8/remove-phpunit-watcher
Open

desrosj wants to merge 2 commits into
fix-actions-5.8/update-php-test-matrixfrom
fix-actions-5.8/remove-phpunit-watcher

Conversation

@desrosj

@desrosj desrosj commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Part of #82935.

What?

Removes the spatie/phpunit-watcher dev dependency from composer.json and composer.lock, along with the two scripts that only ran it: Composer's test:watch and npm's test-php:watch. "test": "phpunit" stays. It also deletes phpunit-watcher.yml.dist and removes the watcher instructions from docs/contributors/code/testing-overview.md.

Why?

The package requires PHP 7.2 or newer, so the 5.6 and 7.0 PHPUnit jobs (added in #84438) can't load it.

It pulls in Symfony packages whose bootstrap files Composer's autoloader always loads. A file has to parse before its own PHP_VERSION_ID check can run, and these don't parse on old PHP (php -l exit codes in real php:5.6-cli and php:7.0-cli containers):

File loaded by vendor/autoload.php PHP 5.6 PHP 7.0
symfony/string/Resources/functions.php 255 255
symfony/polyfill-php80/bootstrap.php 255 0
symfony/deprecation-contracts/function.php 255 0

phpunit/bootstrap.php loads vendor/autoload.php first, so those jobs stop before any test runs.

Removing the package in CI with composer remove --no-update doesn't help: it only edits composer.json, and composer install then warns that the lock is out of date and installs from the lock anyway. So the package is removed from both files. wp/6.0 does the same in #84272.

How?

composer.lock was regenerated with an update limited to this package (composer update spatie/phpunit-watcher --ignore-platform-req=php):

  • 22 packages removed, none added or changed. They are spatie/phpunit-watcher and the packages only it needed: clue/*, evenement/evenement, jolicode/jolinotif, psr/container, react/*, yosymfony/resource-watcher and its symfony/* packages.
  • symfony/polyfill-ctype stays, because other packages still need it.
  • Lock metadata: a new content-hash, plus plugin-api-version 2.0.0 → 2.9.0 and [] → {} for stability-flags, platform and platform-dev, written by the current Composer.

Together with #84441, composer install exits 0 with no lock warning, and every file in vendor/composer/autoload_files.php passes php -l on PHP 5.6 and 7.0.

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: 29af341a-ca60-4267-951c-c3ff047fe023

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/update-php-test-matrix to wp/5.8 October 10, 2026 00:22
@desrosj
desrosj force-pushed the fix-actions-5.8/remove-phpunit-watcher branch from 7eb1070 to d5be7a8 Compare October 10, 2026 00:24
@desrosj
desrosj changed the base branch from wp/5.8 to fix-actions-5.8/update-php-test-matrix 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/remove-phpunit-watcher branch from d5be7a8 to f8d87c2 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/remove-phpunit-watcher branch from f8d87c2 to bd78312 Compare October 22, 2026 18:35

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.

1 participant