|
@@ -58,7 +58,16 @@ EOT
|
|
|
->getMetadataDriverImpl()
|
|
|
->getAllClassNames();
|
|
|
|
|
|
- $output->write(sprintf("Found %d entities mapped in entity manager '%s':",
|
|
|
+ if (!$entityClassNames) {
|
|
|
+ throw new \Exception(
|
|
|
+ 'You do not have any mapped Doctrine ORM entities for any of your bundles. '.
|
|
|
+ 'Create a class inside the Entity namespace of any of your bundles and provide '.
|
|
|
+ 'mapping information for it with Annotations directly in the classes doc blocks '.
|
|
|
+ 'or with XML/YAML in your bundles Resources/config/doctrine/metadata/orm directory.'
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ $output->write(sprintf("Found <info>%d</info> entities mapped in entity manager <info>%s</info>:\n",
|
|
|
count($entityClassNames), $entityManagerName), true);
|
|
|
|
|
|
foreach ($entityClassNames as $entityClassName) {
|