From d7e083104887cdd7f86adf0b15900f843873731a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D1=80=D0=B8=D1=88=D0=B8=D0=BD=20=D0=94=D0=BC=D0=B8?= =?UTF-8?q?=D1=82=D1=80=D0=B8=D0=B9?= Date: Thu, 28 Dec 2023 20:38:38 +0300 Subject: [PATCH] StopExecutionWhenProblemProcessor stops execution when a problem occurs --- src/Processor/StopExecutionWhenProblemProcessor.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Processor/StopExecutionWhenProblemProcessor.php b/src/Processor/StopExecutionWhenProblemProcessor.php index c8e42d3..940ac9f 100644 --- a/src/Processor/StopExecutionWhenProblemProcessor.php +++ b/src/Processor/StopExecutionWhenProblemProcessor.php @@ -52,6 +52,7 @@ public function handler(array $record) $message = $record['message'] ?? 'no message'; $message .= PHP_EOL . (new Exception())->getTraceAsString(); fwrite(STDERR, PHP_EOL . __FILE__ . ':' . __LINE__ . ' : ' . $message . PHP_EOL); + exit(1); // trigger_error() вызвать нельзя, т.к. выполнится перехват хендлером, например \Symfony\Bridge\PhpUnit\DeprecationErrorHandler::handleError() } }