Commit 62148855 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

Issue #3151995 by Gábor Hojtsy, rohnjeynolds, siramsay, JD_1, maxilein,...

Issue #3151995 by Gábor Hojtsy, rohnjeynolds, siramsay, JD_1, maxilein, Arno2Mars, scrumorg, Arngrim: Log PHPStan error in project results to let people know it failed. Fix undefined errors index
parent 4aa22004
......@@ -274,7 +274,16 @@ final class DeprecationAnalyzer {
$json = json_decode(implode('', $output), TRUE);
if (!isset($json['files']) || !is_array($json['files'])) {
$this->logger->error('PHPStan failed: %results', ['%results' => print_r($output, TRUE)]);
$json = ['files' => [], 'totals' => ['file_errors' => 0]];
$json = [
'files' => [
'PHPStan failed' => 'PHP API deprecations cannot be checked. Reason: ' . $output,
'line' => 0,
],
'totals' => [
'errors' => 1,
'file_errors' => 1,
],
];
}
$result = [
'date' => $this->time->getRequestTime(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment