/** * Show the current status of entities and mappings * * Shows basic information about which entities exist and possibly if their * mapping information contains errors or not. * * To run a full validation, use the validate command. * * @param boolean $dumpMappingData If set, the mapping data will be output * @return void * @see typo3.flow3:doctrine:validate */ public function entityStatusCommand($dumpMappingData = FALSE) { $info = $this->doctrineService->getEntityStatus(); if ($info === array()) { $this->output('You do not have any mapped Doctrine ORM entities according to the current configuration. '); $this->outputLine('If you have entities or mapping files you should check your mapping configuration for errors.'); } else { $this->outputLine('Found %d mapped entities:', array(count($info))); foreach ($info as $entityClassName => $entityStatus) { if ($entityStatus instanceof \Doctrine\Common\Persistence\Mapping\ClassMetadata) { $this->outputLine('[OK] %s', array($entityClassName)); if ($dumpMappingData) { \TYPO3\FLOW3\Error\Debugger::clearState(); $this->outputLine(\TYPO3\FLOW3\Error\Debugger::renderDump($entityStatus, 0, TRUE, TRUE)); } } else { $this->outputLine('[FAIL] %s', array($entityClassName)); $this->outputLine($entityStatus); $this->outputLine(); } } } }