-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Declaration of ArraySubset::evaluate incompatible with PHPUnit 7.5 #31101
Comments
I think the actual culprit is probably https://github.com/laravel/framework/blame/02a326ce5641b741fafb017f3d02b8917ba5e563/src/Illuminate/Foundation/Testing/Constraints/ArraySubset.php#L193 because the line you highlighted is only used when PHPUnit is installed. |
@driesvints If PHPUnit 7.x is not supported on versions higher than Laravel 6.9.0, maybe it's an idea to at least retroactively add that requirement to the Laravel 5.8 > 6 upgrade guide? |
#31113 will be merged soon (probably tomorrow), and released as 6.12.0, most likely on Tuesday 21st January. Laravel 7 will drop support for PHPUnit 7. |
PHPUnit 7 is supported on Laravel 6. We are treating it as a bug that the latest version of Laravel 6 doesn't support it. A fix will be merged shortly (see my above comment). |
Supported versions matrix:
|
Note that there may be some breaks with PHP 8.0 and PHPUnit 9.0, but these will be fixed, as we are saying we will support them going forward, since Laravel 6 is LTS. |
Description:
@GrahamCampbell
I'm getting a very similar issue to #28827 on Laravel 6.10.1 in combination with PHPUnit 7.5.20
ErrorException : Declaration of Illuminate\Foundation\Testing\Constraints\ArraySubset::evaluate($other, string $description = '', bool $returnResult = false) should be compatible with PHPUnit\Framework\Constraint\Constraint::evaluate($other, $description = '', $returnResult = false)
This type signature was not updated in PHPUnit, but it has been changed 11 days ago in Laravel Framework with the release of 6.10.x
https://github.com/sebastianbergmann/phpunit/blob/7.5.20/src/Framework/Constraint/Constraint.php#L47
https://github.com/laravel/framework/blame/02a326ce5641b741fafb017f3d02b8917ba5e563/src/Illuminate/Foundation/Testing/Constraints/ArraySubset.php#L58
The text was updated successfully, but these errors were encountered: