Skip to content

Commit b21398f

Browse files
committedMay 1, 2024
[PhpUnitBridge] Fix DeprecationErrorHandler with PhpUnit 10
1 parent 969b505 commit b21398f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎DeprecationErrorHandler.php

+6
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,12 @@ private static function getPhpUnitErrorHandler()
368368

369369
if ('PHPUnit\Util\ErrorHandler::handleError' === $eh) {
370370
return $eh;
371+
} elseif (ErrorHandler::class === $eh) {
372+
return function (int $errorNumber, string $errorString, string $errorFile, int $errorLine) {
373+
ErrorHandler::instance()($errorNumber, $errorString, $errorFile, $errorLine);
374+
375+
return true;
376+
};
371377
}
372378

373379
foreach (debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) {

0 commit comments

Comments
 (0)
Please sign in to comment.