Repository navigation
PHP: test-file evidence on PHPUnit 9 and 10, and a coverage run that loads pcov once - #558
Merged
Merged
Conversation
…st class's file, because --list-test-files exists only from PHPUnit 11 and a project on 9 or 10 (ramsey/uuid among them) got no unit evidence at all; and print a failed listing's output once, not three times. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… it under the injected ini scan path, because the second load's start-up warning on stderr failed every test PHPUnit runs in a separate process (eight ramsey/uuid test files gave no unit evidence). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…easured on ramsey/uuid: 59 of 67 test files gave evidence with the listing fix alone and all 67 with pcov loaded once. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
--list-test-files, which exists only from PHPUnit 11. On 9.6 and 10.5 the listing stopped atUnknown option "--list-test-files", so a project on those versions got no unit evidence: files were paired by name only and graded by the whole suite. ramsey/uuid, the PHP project in the ledger, is on PHPUnit 9.6.extension=pcoveven when PHP already loads it. The second load prints a warning on stderr at every start, and PHPUnit fails a test it runs in a separate process when that process writes to stderr.What changed
--list-tests, run under a small setup that has PHP print the file each test class was loaded from (Runner.ListUnitsSetup, new). One listing for PHPUnit 9.6 to 12.5.--group/--exclude-groupwhen listing and say so; that sentence is read as no listing, so such a command is graded by the whole suite as before.VerdictGeneration47.scripts/listunitscmdprints a row's listing script, so the fixture capture runs the row's own setup instead of a copy.Measured
CORRALAI_RUNNER_ROOTset.7a16331,certify --repo --dry-run --evidencein the bwrap jail: released build lists nothing; with the listing fix 67 test files are listed and 59 give evidence; with pcov loaded once all 67 do, and 11 source files are paired by evidence.go test ./...and every gate were green on the listing commit; after the pcov commit and the last changelog edit I reraninternal/lang,internal/reposcan,^TestDocs, the doc generators' checks, licensing and the security gate, not the whole suite.Not covered
capture-runner-fixtures.shwere run, by hand; the whole script was not.php.🤖 Generated with Claude Code