-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
PHPUnit\Framework\TestCase / PHPUnit\Framework\Test interface contradiction [PHPUnit 6.5] #3209
Comments
weirdan
added a commit
to weirdan/psalm
that referenced
this issue
Jul 13, 2018
weirdan
added a commit
to weirdan/psalm
that referenced
this issue
Jul 13, 2018
muglug
pushed a commit
to vimeo/psalm
that referenced
this issue
Jul 13, 2018
* upgrade phpunit, test with low and high deps * work around possibly-anonymous test cases introduced by newer PHPUnit * Alternative TestCase::getName() nullability workaround Previous workaround was failing due to PHP warnings on 7.1 or 7.2 (depending on specific signature). There's just no signature that would be working for all 4 variants of (ver / dep) matrix. * don't disable xdebug if it's not enabled * allowed 7.0/high to fail until PHPUnit 6.5.10 is released see sebastianbergmann/phpunit#3209
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version: PHPUnit 6.5
PHPUnit\Framework\TestCase::run()
is defined as returning nullable TestResult, howeverPHPUnit\Framework\Test::run()
(whichTestCase::run()
should be compatible to) declares non-nullable return type, both in docblocks.phpunit/src/Framework/TestCase.php
Lines 758 to 762 in 093ca55
phpunit/src/Framework/Test.php
Lines 18 to 27 in 093ca55
This results in the static analyzers complaining (which, of course, could be suppressed, but I think it'd be better fixed in PHPUnit).
For the reference, PHPUnit 7 has non-nullable returns on the corresponding class and interface methods.
The text was updated successfully, but these errors were encountered: