/** * Renders a table for a schema update result * * @param SchemaUpdateResult $result Result of the schema update * @return void */ protected function outputSchemaUpdateResult(SchemaUpdateResult $result) { $tableRows = array(); foreach ($result->getPerformedUpdates() as $type => $numberOfUpdates) { $tableRows[] = array($this->schemaUpdateTypeLabels[(string) $type], $numberOfUpdates); } $this->output->outputTable($tableRows, array('Type', 'Updates')); if ($result->hasErrors()) { foreach ($result->getErrors() as $type => $errors) { $this->output->outputLine(sprintf('<error>Errors during "%s" schema update:</error>', $this->schemaUpdateTypeLabels[(string) $type])); foreach ($errors as $error) { $this->output->outputFormatted('<error>' . $error . '</error>', array(), 2); } } } }