Created
August 29, 2012 09:09
-
-
Save kdambekalns/3508881 to your computer and use it in GitHub Desktop.
Add --dump-mapping-data to doctrine:entitystatus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Classes/Command/DoctrineCommandController.php b/Classes/Command/DoctrineCommandController.php | |
index 9ce9c72..7b2e599 100644 | |
--- a/Classes/Command/DoctrineCommandController.php | |
+++ b/Classes/Command/DoctrineCommandController.php | |
@@ -132,13 +132,15 @@ class DoctrineCommandController extends \TYPO3\FLOW3\MVC\Controller\CommandContr | |
* 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. | |
+ * 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() { | |
+ public function entityStatusCommand($dumpMappingData = FALSE) { | |
$info = $this->doctrineService->getEntityStatus(); | |
if ($info === array()) { | |
@@ -147,8 +149,12 @@ class DoctrineCommandController extends \TYPO3\FLOW3\MVC\Controller\CommandContr | |
} else { | |
$this->outputLine('Found %d mapped entities:', array(count($info))); | |
foreach ($info as $entityClassName => $entityStatus) { | |
- if ($entityStatus === TRUE) { | |
+ 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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment