Skip to content

[6.x] Fix FastParserTest clashing with PHPUnit 13's attempt() method - #15976

Merged
jasonvarga merged 1 commit into
6.xfrom
fix-fast-parser-test
Nov 19, 2026
Merged

jasonvarga merged 1 commit into
6.xfrom
fix-fast-parser-test

Conversation

@duncanmcclean

@duncanmcclean duncanmcclean commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

This pull request fixes a fatal error when running the test suite with PHPUnit 13:

PHP Fatal error:  Cannot override final method PHPUnit\Framework\TestCase::attempt() in tests/Yaml/FastParserTest.php on line 237

This was happening because FastParserTest defines a private attempt() helper, but PHPUnit 13.4.7 added a final public function attempt() to TestCase.

We haven't run into it on 6.x yet because composer.json constrains PHPUnit to ^12.5.23. It only showed up in #15783, which widens the constraint to ^12.5.23 || ^13.4.5 for PHP 8.6 compatibility.

This PR fixes it by renaming the helper to attemptToParse().

Caused by #15877
Related: #15783

… 13's final `TestCase::attempt()`

Amp-Thread-ID: https://ampcode.com/threads/T-01a1f452-a435-7101-b9d0-de5654611a80
Co-authored-by: Amp <amp@ampcode.com>
@jasonvarga
jasonvarga merged commit 1fbb0c0 into 6.x Nov 19, 2026
67 checks passed
@jasonvarga
jasonvarga deleted the fix-fast-parser-test branch November 19, 2026 16:05
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.

2 participants