php-mock/php-mock-phpunit

Incompatibility with PHPUnit 8.4

MasterOdin opened this issue · 2 comments

In the latest release of PHPUnit, a PR was merged that refactored the Invocation interfaces, refactoring them into more specific "rules" than just one broad matcher and consequently \PHPUnit\Framework\MockObject\Matcher\Invocation was removed. A list of the stuff that is broken from this change can be found here:
https://github.com/php-mock/php-mock-phpunit/search?q=Matcher%5CInvocation&unscoped_q=Matcher%5CInvocation

Here's the upstream PR that shows these changes: sebastianbergmann/phpunit#3849

@MasterOdin Thanks for reporting. Would you like provide patch? :)

I can look into it in a couple of days, sure. I'm guessing the best option would be to see if possible to do something similar as https://github.com/php-mock/php-mock-phpunit/blob/master/autoload.php#L3-L8 where if the new interfaces do not exist, then create an alias to the original interface to keep things working on < 8.4.