Skip to content

test: support phpunit 11, 12 and 13, and run the suite with paratest - #205

Merged
kbond merged 5 commits into
zenstruck:1.xfrom
kbond:phpunit-11-12
Aug 24, 2026
Merged

test: support phpunit 11, 12 and 13, and run the suite with paratest#205
kbond merged 5 commits into
zenstruck:1.xfrom
kbond:phpunit-11-12

Conversation

@kbond

@kbond kbond commented Aug 24, 2026

Copy link
Copy Markdown
Member

Widens the PHPUnit constraint to 11, 12 and 13 by carrying test metadata in both forms: 9.6 reads only the annotations, 13 reads only the attributes.

That unlocks ParaTest, which the CI test job now uses (--functional). Two things were needed: the bootstrap wiped var/ in every worker, so workers cleared each other's cache and artifacts mid-run, and one test had to be renamed because ParaTest filters chunks with /name$/.

Also registers BrowserExtension in phpunit.xml.dist, which was never enabled here, and covers its artifact saving: saveBrowserStates() swallows every Throwable, so a broken save went unnoticed.

kbond added 5 commits August 24, 2026 10:30
Test metadata is duplicated as attributes: 9.6 only reads the annotations, 13 only reads the attributes.
The bootstrap wiped var/ in every worker, so workers cleared each others cache and artifacts mid-run: only the parent cleans up now. A test was also renamed, since paratest filters each chunk with /name$/ and a name ending with another test name in the same class runs twice.
Committed by accident in zenstruck#121 alongside the fixture it duplicates: only `tests/Fixture/files/attachment.zip` is read, by the `/zip` route.
The extension was never registered here, so nothing exercised it. The new tests drive the hooks phpunit calls, because saveBrowserStates() swallows every Throwable and a broken save would otherwise go unnoticed.
@kbond
kbond merged commit 610be4f into zenstruck:1.x Aug 24, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant