/**
* Validate the class/table mappings
*
* Checks if the current class model schema is valid. Any inconsistencies
* in the relations between models (for example caused by wrong or
* missing annotations) will be reported.
*
* Note that this does not check the table structure in the database in
* any way.
*
* @return void
* @see neos.flow:doctrine:entitystatus
*/
public function validateCommand()
{
$this->outputLine();
$classesAndErrors = $this->doctrineService->validateMapping();
if (count($classesAndErrors) === 0) {
$this->outputLine('Mapping validation passed, no errors were found.');
} else {
$this->outputLine('Mapping validation FAILED!');
foreach ($classesAndErrors as $className => $errors) {
$this->outputLine(' %s', [$className]);
foreach ($errors as $errorMessage) {
$this->outputLine(' %s', [$errorMessage]);
}
}
$this->quit(1);
}
}