File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ public static function register($mode = 0)
48
48
}
49
49
50
50
$ UtilPrefix = class_exists ('PHPUnit_Util_ErrorHandler ' ) ? 'PHPUnit_Util_ ' : 'PHPUnit\Util \\' ;
51
- self ::$ isAtLeastPhpUnit83 = method_exists ('PHPUnit\Util\ErrorHandler ' , '__invoke ' );
52
51
53
52
$ getMode = function () use ($ mode ) {
54
53
static $ memoizedMode = false ;
@@ -304,6 +303,9 @@ public static function collectDeprecations($outputFile)
304
303
*/
305
304
public static function getPhpUnitErrorHandler ()
306
305
{
306
+ if (!isset (self ::$ isAtLeastPhpUnit83 )) {
307
+ self ::$ isAtLeastPhpUnit83 = class_exists (ErrorHandler::class) && method_exists (ErrorHandler::class, '__invoke ' );
308
+ }
307
309
if (!self ::$ isAtLeastPhpUnit83 ) {
308
310
return (class_exists ('PHPUnit_Util_ErrorHandler ' , false ) ? 'PHPUnit_Util_ ' : 'PHPUnit\Util \\' ).'ErrorHandler::handleError ' ;
309
311
}
You can’t perform that action at this time.
0 commit comments