Skip to content

Commit

Permalink
Support PHPUnit 11
Browse files Browse the repository at this point in the history
  • Loading branch information
W0rma committed Feb 2, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
xeho91 Mateusz Kadlubowski
1 parent f6bc56e commit 56eec33
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
},
"require": {
"php": "^7.4 | ^8.0",
"phpunit/phpunit": "^8.4 | ^9.0 | ^10.0 | 10.0.x-dev"
"phpunit/phpunit": "^8.4 | ^9.0 | ^10.0 | ^11"
},
"require-dev": {
"consolidation/robo": "^3.0"
4 changes: 3 additions & 1 deletion src/Stub.php
Original file line number Diff line number Diff line change
@@ -416,7 +416,9 @@ public static function constructEmptyExcept(
private static function generateMock()
{
$args = func_get_args();
if (version_compare(PHPUnitVersion::series(), '10.4', '>=') && !is_bool($args[1])) {
if (version_compare(PHPUnitVersion::series(), '11', '>=') && !is_bool($args[1])) {
array_splice($args, 1, 0, [true, true]);
} elseif (version_compare(PHPUnitVersion::series(), '10.4', '>=') && !is_bool($args[1])) {
array_splice($args, 1, 0, [true]);
}

0 comments on commit 56eec33

Please sign in to comment.