src/ErrorHandler.php
protected function render(string $title, array $messages, string $trace = null)
    {
        $output   = new OutputStyle(new ArgvInput(), new ConsoleOutput());
        $messages = array_merge(["<fg=white;bg=red;options=bold>$title</>"], $messages);

        $output->block($messages, 'ERROR', 'fg=white;bg=red', ' ', true, false);

        if ($trace) {
            $trace = str_replace(\Yii::getAlias('@root'), '', $trace);
            $trace = "<fg=red;options=bold>Stack trace:</>" . PHP_EOL . PHP_EOL . $trace;
            $output->block($trace, null, 'fg=white', '<fg=red>▓ </> ', true, false);
        }
    }
protected function render(string $title, array $messages, string $trace = null)
    {
        $output   = new OutputStyle(new ArgvInput(), new ConsoleOutput());
        $messages = array_merge(["<fg=white;bg=red;options=bold>$title</>"], $messages);

        $output->block($messages, 'ERROR', 'fg=white;bg=red', ' ', true, false);

        if ($trace) {
            $trace = str_replace(\Yii::getAlias('@root'), '', $trace);
            $trace = "<fg=red;options=bold>Stack trace:</>" . PHP_EOL . PHP_EOL . $trace;
            $output->block($trace, null, 'fg=white', '<fg=red>▓ </> ', true, false);
        }
    }
@param string      $title
@param array       $messages
@param string|null $trace

@return string|void