New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecation issues with phpunit 8 #1024
Comments
Solution is something like this
Used as an extension in
For this last, we need to update the docs. Note: extensions are usable from phpunit >= 7.1 |
This has been fixed in the 1.4 series @davedevelopment? |
I thought so, I think we nailed everything... |
@rbaarsma I think the situation is Mockery doesn't support PHPUnit 8 together with PHP 7.1 or 7.2. If you are using PHP 7.2 or lower with Mockery, PHPUnit 7 is the newest version of PHPUnit you can use. If you want to use PHPUnit 8 or newer, you must have PHP 7.3 or higher. I think this restriction is fine. You'll just need to make sure your builds pull the correction version combinations. |
@davedevelopment I'm getting the deprecation warning with PHPUnit 9, Mockery 1.4.2.
|
Which exact version of PHPUnit 9? |
@GrahamCampbell 9.3.7 and 9.2.6 I have 2 different projects that are on the 2 different versions, and I'm seeing the message on both. |
@GrahamCampbell I've updated my projects to 9.3.8 and the warning messages are still appearing. I see that the composer.json says it conflicts with PHPUnit <8.0, wouldn't it be prudent to use the new PHPUnit interfaces as indicated? I am also seeing this message:
|
After looking into this a bit more, and looking at PHPUnit's own repo, I found sebastianbergmann/phpunit#3390. So, I think this is more on PHPUnit to fix the TestHook implementation before anything can really be done. With the current iteration of the TestHook architecture, I wasn't able to find an easy way to add Mockery's pre- or post-test hook functionality, as the |
I'm guessing we need a
Mockery\Adapter\Phpunit\Legacy\TestListenerForV8
class to migrate this in a similar way as the existing V7, V6 and V5The text was updated successfully, but these errors were encountered: