Skip to content

feat(phpunit): run PHPUnit 10+ suites in the in-process runner - #2620

Merged
chubes4 merged 1 commit into
mainfrom
fix/issue-2619-wp-codebox
Dec 2, 2026
Merged

chubes4 merged 1 commit into
mainfrom
fix/issue-2619-wp-codebox

Conversation

@chubes4

@chubes4 chubes4 commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Project bootstraps that loaded PHPUnit 10 or newer reached the PHPUnit 9 runner API and failed before executing tests. Both in-process runners now detect the loaded major and use PHPUnit’s Application entrypoint for 10–12 while preserving the existing structured output and exit-code contract.

What changed

  • Route PHPUnit 10–12 through its Application entrypoint without rerunning the WordPress bootstrap.
  • Preserve configuration, filtering, named suites, selected-file and changed-file scoping, and test listing.
  • Emit the existing result and stage markers from PHPUnit’s results and preserve JUnit capture.
  • Add a recipe integration test that installs real PHPUnit 11 with Composer in a temporary fixture.

Verification

All gates passed on 4ef1bc4. Base main@9c00132 unchanged.

  • HOMEBOY_LINT_BASE=9c001329830108844eb9463786d6808e65b2f7a6 homeboy --placement local review lint wp-codebox --path . --…: passed, 102461 ms; retained gate metadata.
  • npm run build: passed, 499 ms; retained gate metadata.
  • npx tsx --test tests/phpunit-discovery-only.test.ts tests/phpunit-project-autoload.test.ts: passed, 2040 ms; retained gate metadata.
  • repro: none (no repro gate was declared, so these gates do not prove the issue).
  • CI: pending

Cook run
  • Cook ID: agent-task-6dc3d80c-d394-4149-9c42-e6f9f2ef2118
  • Attempt run ID: agent-task-6dc3d80c-d394-4149-9c42-e6f9f2ef2118-attempt-1-227cdc8f
  • Gate 1: tree ff72c199f6cc6e74acc5ae05ac2437e5a9faa859
  • Gate 2: tree ff72c199f6cc6e74acc5ae05ac2437e5a9faa859
  • Gate 3: tree ff72c199f6cc6e74acc5ae05ac2437e5a9faa859

Evidence

  • Main vs. PR, same real PHPUnit 11 project recipe: main reported STAGE_FAIL:run_tests:TypeError because TestRunner::run() received a TestSuite instead of a Configuration. The PR reported SOME TESTS FAILED, TESTS: 2 ASSERTIONS: 2 FAILURES: 1 ERRORS: 0, and STAGE_OK:run_tests, with exit 1. The passing-only filter reported ALL TESTS PASSED with exit 0.
  • The local PHPUnit 11 integration test ran without skips and verified listing, scoping, and JUnit capture. Local mixed-suite recipes also executed on PHPUnit 9.6, 10.3, 10.5, and 12.5; listing was additionally verified on 10.3.
  • The local build and focused discovery and project-autoload tests passed. The local Homeboy lint run passed its build self-check; the Node.js extension reported no standalone lint surface.

AI disclosure

Tool: Homeboy Cook. Agent: Homeboy (roadie). Model: roadie · route cook-heavy · served gpt-6.2-sol. Cook time: 27m32s.

AI implemented the version-aware runner and verified it with Composer-installed PHPUnit fixtures, under the direction of the Cook requester. Homeboy reports controller verification separately from this account of the AI's work. A human reviews before merge.

Refs #2619

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