Skip to content

Repair wp/5.9 branch Actions: Remove the spatie/phpunit-watcher dev dependency - #612

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

desrosj wants to merge 1 commit into
fix-actions-5.9/update-php-test-matrixfrom
fix-actions-5.9/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 test:watch Composer script and the test-php:watch npm script that only ran it.

Why?

The PHPUnit matrix in #392 adds PHP 5.6 and 7.0 jobs. spatie/phpunit-watcher requires PHP 7.2+ and pulls in symfony/polyfill-php80, symfony/string and symfony/deprecation-contracts. Their bootstrap files are listed in vendor/composer/autoload_files.php, so PHP has to parse them before their PHP_VERSION_ID guards run. php -l on the installed files in php:5.6-cli (5.6.40) and php:7.0-cli (7.0.33):

autoload_files.php entry PHP 5.6 PHP 7.0
symfony/polyfill-php80/bootstrap.php 255 255
symfony/string/Resources/functions.php 255 255
symfony/deprecation-contracts/function.php 255 0

phpunit/bootstrap.php requires vendor/autoload.php, so those jobs fail before any test runs.

Removing the package in a workflow step doesn't work on this branch, because it commits a composer.lock: composer remove spatie/phpunit-watcher --dev --no-update only edits composer.json, and the following composer install warns that the lock is out of date and installs the package again from the lock. wp/6.0 makes the same change in WordPress#84272.

How?

composer.lock was regenerated with composer update spatie/phpunit-watcher (a partial update, not a full composer update), which reported 0 installs, 0 updates, 22 removals:

  • The lock goes from 59 packages to 37. The 22 removed packages are spatie/phpunit-watcher's dependency tree; symfony/polyfill-ctype stays because other packages still require it.
  • No remaining package changes version or reference.
  • The only other lock changes are metadata: content-hash, plugin-api-version (2.1.0 → 2.9.0), and platform, platform-dev and stability-flags written as {} instead of [].

Testing

With #341's config.platform.php on top:

  • composer install exits 0 with no lock warning.
  • vendor/spatie and vendor/symfony/polyfill-php80 are gone.
  • Every entry in vendor/composer/autoload_files.php passes php -l under 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 #616 October 6, 2026 18:27
@desrosj
desrosj added this pull request to stack #636 October 6, 2026 18:28
@desrosj
desrosj removed this pull request from stack #636 October 7, 2026 00:58
@desrosj
desrosj added this pull request to stack #643 October 7, 2026 00:59
@desrosj
desrosj removed this pull request from stack #643 October 7, 2026 18:02
@desrosj
desrosj changed the base branch from fix-actions-5.9/update-php-test-matrix to wp/5.9 October 7, 2026 18:02
@desrosj
desrosj force-pushed the fix-actions-5.9/remove-phpunit-watcher branch from b0022e9 to 645eafa Compare October 7, 2026 18:04
@desrosj
desrosj changed the base branch from wp/5.9 to fix-actions-5.9/update-php-test-matrix October 7, 2026 18:05
@desrosj
desrosj added this pull request to stack #668 October 7, 2026 18:06
@desrosj
desrosj removed this pull request from stack #668 October 8, 2026 19:35
@desrosj
desrosj force-pushed the fix-actions-5.9/remove-phpunit-watcher branch from 645eafa to ff897ab Compare October 8, 2026 19:35
@desrosj
desrosj added this pull request to stack #695 October 8, 2026 19:35
@desrosj
desrosj marked this pull request as ready for review October 9, 2026 16:35
@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#84404.

@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