Right now we are using phpunit 7.5.14
The 7.x branch of phpunit only supports (officially) php71, php72 and php73.
The 8.x branch of phpunit only supports php72, php73 and php74.
Moodle 3.8.x is expected to support php71, php72, php73 and php74.
The 8.x phpunit branch cannot be used for php71 (the min php72 requirement is locked).
The 7.5 phpunit branch can be used for php74, if some changes are applied to it.
This 7.5 phpunit PR has been accepted, enabling our tests to run without problem (other than the problems that will be fixed in the 7.4 epic:
This issue is about to:
1) Wait till a new phpunit 7.5.15 is released.
2) composer update core to get the php 7.4 fix applied to our runs.
3) test moodle with php74 normally.
A) Surely for Moodle 3.9 release, that will support php72, php73 and php74... we'll have to bump to phpunit 8.x (because it matches the php versions 100%). This is a recurring tasks to be performed yearly, for all the May releases.
B) Trick: Until phpunit 7.5.15 is released anybody wanting to run unit tests agains php74 can apply for it by changing our composer.json this way (and then execute a composer update):