fix(test): fix redundant terminal output during phpunit (#1194)

This commit is contained in:
Jerry Ma
2026-06-22 08:08:47 +08:00
committed by GitHub
parent 408d8f755c
commit 227b8f0b0a
16 changed files with 844 additions and 51 deletions

View File

@@ -54,6 +54,10 @@ abstract class BaseCommand extends Command
}
set_error_handler(static function ($error_no, $error_msg, $error_file, $error_line) {
// Respect the @ suppression operator (error_reporting() returns 0 when @ is used)
if (error_reporting() === 0) {
return true;
}
$tips = [
E_WARNING => ['PHP Warning: ', 'warning'],
E_NOTICE => ['PHP Notice: ', 'notice'],