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)
4848 }
4949
5050 $ UtilPrefix = class_exists ('PHPUnit_Util_ErrorHandler ' ) ? 'PHPUnit_Util_ ' : 'PHPUnit\Util \\' ;
51- self ::$ isAtLeastPhpUnit83 = method_exists ('PHPUnit\Util\ErrorHandler ' , '__invoke ' );
5251
5352 $ getMode = function () use ($ mode ) {
5453 static $ memoizedMode = false ;
@@ -304,6 +303,9 @@ public static function collectDeprecations($outputFile)
304303 */
305304 public static function getPhpUnitErrorHandler ()
306305 {
306+ if (!isset (self ::$ isAtLeastPhpUnit83 )) {
307+ self ::$ isAtLeastPhpUnit83 = class_exists (ErrorHandler::class) && method_exists (ErrorHandler::class, '__invoke ' );
308+ }
307309 if (!self ::$ isAtLeastPhpUnit83 ) {
308310 return (class_exists ('PHPUnit_Util_ErrorHandler ' , false ) ? 'PHPUnit_Util_ ' : 'PHPUnit\Util \\' ).'ErrorHandler::handleError ' ;
309311 }
You can’t perform that action at this time.
0 commit comments