Skip to content

Update PHPUnit configuration schema for PHPUnit 9.3 and replace deprecated at() Mocks - #393

Merged
jsor merged 3 commits into
reactphp:masterfrom
SimonFrings:tests
Sep 4, 2020
Merged

Update PHPUnit configuration schema for PHPUnit 9.3 and replace deprecated at() Mocks#393
jsor merged 3 commits into
reactphp:masterfrom
SimonFrings:tests

Conversation

@SimonFrings

@SimonFringsSimonFrings commented Sep 2, 2020

Copy link
Copy Markdown
Member

PHPUnit 9.3 released a new schema for the phpunit.xml configuration file. I had to migrate the file to the new format in order to avoid the warning. PHPUnit Versions older than 9.3 have to use the phpunit.xml.legacy configuration file, because the new format is unknown for them.
I also had to update some tests, because the at() matcher deprecated in PHPUnit 9.3 and will be removed in PHPUnit 10.

Together with the changes from #391 by @clue it's possible to run this code with PHP 8 without any warnings in your output 🎉

$ docker run -it --rm -v `pwd`:/data --workdir=/data php:8.0.0beta2-cli php vendor/bin/phpunit
PHPUnit 9.3.8 by Sebastian Bergmann and contributors.
............................................................... 63 / 673 ( 9%)
............................................................... 126 / 673 ( 18%)
............................................................... 189 / 673 ( 28%)
............................................................... 252 / 673 ( 37%)
............................................................... 315 / 673 ( 46%)
............................................................... 378 / 673 ( 56%)
............................................................... 441 / 673 ( 65%)
............................................................... 504 / 673 ( 74%)
............................................................... 567 / 673 ( 84%)
............................................................... 630 / 673 ( 93%)
........................................... 673 / 673 (100%)
Time: 00:16.651, Memory: 20.00 MB
OK (673 tests, 1604 assertions)

For further details concerning this pull request look into graphp/graphviz#46.
This pull request builds on top of reactphp/http#364.

@SimonFrings
SimonFringsforce-pushed the tests branch 3 times, most recently from 7b460dd to 04c8024CompareSeptember 3, 2020 12:32
clue
clue approved these changes Sep 3, 2020

@clueclue left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SimonFrings Thanks for the update, changes LGTM! :shipit:

@clue
clue requested review from WyriHaximus and jsorSeptember 3, 2020 13:08
jsor
jsor approved these changes Sep 4, 2020
@jsor
jsor merged commit a5f48fd into reactphp:masterSep 4, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@SimonFrings@jsor@WyriHaximus@clue