Skip to content

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

Closed
desrosj wants to merge 1 commit into
fix-actions-5.8/update-php-test-matrixfrom
fix-actions-5.8/remove-phpunit-watcher
Closed

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

Conversation

@desrosj

@desrosj desrosj commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

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.

Why?

The package requires PHP 7.2 or newer, so the 5.6 and 7.0 PHPUnit jobs (added in #332) 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 WordPress#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 #455, 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

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

🤖 PR meta 🤖

🏷️ Labels

This pull request needs exactly one label indicating its type, and has 0.

  • Required: any label starting with [Type].
  • Found: none.

Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you.

@desrosj
desrosj removed this pull request from stack #615 October 7, 2026 01:12
@desrosj
desrosj added this pull request to stack #647 October 7, 2026 01:12
@desrosj
desrosj removed this pull request from stack #647 October 7, 2026 18:05
@desrosj
desrosj changed the base branch from fix-actions-5.8/update-php-test-matrix to wp/5.8 October 7, 2026 18:06
@desrosj
desrosj force-pushed the fix-actions-5.8/remove-phpunit-watcher branch from a309846 to 8b42e22 Compare October 7, 2026 18:07
@desrosj
desrosj changed the base branch from wp/5.8 to fix-actions-5.8/update-php-test-matrix October 7, 2026 18:09
@desrosj
desrosj added this pull request to stack #671 October 7, 2026 18:09
@desrosj
desrosj removed this pull request from stack #671 October 8, 2026 19:34
@desrosj
desrosj force-pushed the fix-actions-5.8/remove-phpunit-watcher branch from 8b42e22 to aaf7284 Compare October 8, 2026 19:34
@desrosj
desrosj added this pull request to stack #694 October 8, 2026 19:35
@desrosj
desrosj removed this pull request from stack #694 October 9, 2026 13:13
@desrosj
desrosj added this pull request to stack #702 October 9, 2026 13:14
@desrosj
desrosj removed this pull request from stack #702 October 9, 2026 13:34
@desrosj
desrosj added this pull request to stack #705 October 9, 2026 13:34
@desrosj
desrosj removed this pull request from stack #705 October 9, 2026 14:01
@desrosj
desrosj added this pull request to stack #708 October 9, 2026 14:02
@desrosj
desrosj removed this pull request from stack #708 October 9, 2026 14:13
@desrosj
desrosj added this pull request to stack #712 October 9, 2026 14:13
@desrosj
desrosj marked this pull request as ready for review October 9, 2026 17:42
@github-actions

github-actions Bot commented Oct 9, 2026

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 commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

Moved to WordPress#84439.

@desrosj desrosj closed this Oct 9, 2026
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.

1 participant