diff --git a/src/Application/FileProcessor/PhpFileProcessor.php b/src/Application/FileProcessor/PhpFileProcessor.php index 6295cb6aacb..5e8566e735c 100644 --- a/src/Application/FileProcessor/PhpFileProcessor.php +++ b/src/Application/FileProcessor/PhpFileProcessor.php @@ -94,6 +94,7 @@ public function process(array $files): void // cannot print file with errors, as print would break everything to original nodes if ($file->hasErrors()) { + $this->printFileErrors($file); $this->advance($file, 'printing skipped due error'); continue; } @@ -228,4 +229,19 @@ private function advance(File $file, string $phase): void $this->symfonyStyle->progressAdvance(); } } + + private function printFileErrors(File $file): void + { + if(!$this->symfonyStyle->isVerbose()) { + return; + } + + if(!$file->hasErrors()) { + return; + } + + foreach ($file->getErrors() as $error) { + $this->symfonyStyle->error($error->getMessage()); + } + } }