File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1111 },
1212 "require" : {
1313 "php" : " ^7.4 | ^8.0" ,
14- "phpunit/phpunit" : " ^8.4 | ^9.0 | ^10.0 | 10.0.x-dev "
14+ "phpunit/phpunit" : " ^8.4 | ^9.0 | ^10.0 | ^11 "
1515 },
1616 "require-dev" : {
1717 "consolidation/robo" : " ^3.0"
Original file line number Diff line number Diff line change @@ -416,7 +416,19 @@ public static function constructEmptyExcept(
416416 private static function generateMock ()
417417 {
418418 $ args = func_get_args ();
419- if (version_compare (PHPUnitVersion::series (), '10.4 ' , '>= ' ) && !is_bool ($ args [1 ])) {
419+ if (version_compare (PHPUnitVersion::series (), '11 ' , '>= ' )) {
420+ if (!is_bool ($ args [1 ]) || !is_bool ($ args [2 ])) {
421+ $ additionalParameters = [];
422+ if (!is_bool ($ args [1 ])) {
423+ $ additionalParameters [] = true ;
424+ }
425+ if (!is_bool ($ args [2 ])) {
426+ $ additionalParameters [] = true ;
427+ }
428+
429+ array_splice ($ args , 1 , 0 , $ additionalParameters );
430+ }
431+ } elseif (version_compare (PHPUnitVersion::series (), '10.4 ' , '>= ' ) && !is_bool ($ args [1 ])) {
420432 array_splice ($ args , 1 , 0 , [true ]);
421433 }
422434
You can’t perform that action at this time.
0 commit comments