From e62b51cf38ad7b49dc826917c89759ccf3d621fb Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Wed, 12 May 2010 23:42:48 +0200 Subject: [PATCH] DDC-515 - Deleted obsolte SchemaValidatorCommand (we already had a ValidatorSchemaCommand) --- .../Command/SchemaValidatorCommand.php | 80 ------------------- 1 file changed, 80 deletions(-) delete mode 100644 lib/Doctrine/ORM/Tools/Console/Command/SchemaValidatorCommand.php diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaValidatorCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaValidatorCommand.php deleted file mode 100644 index 61d07fbc2..000000000 --- a/lib/Doctrine/ORM/Tools/Console/Command/SchemaValidatorCommand.php +++ /dev/null @@ -1,80 +0,0 @@ -. -*/ - -namespace Doctrine\ORM\Tools\Console\Command; - -use Symfony\Components\Console\Input\InputArgument, - Symfony\Components\Console\Input\InputOption, - Symfony\Components\Console; - -/** - * Schema Validator Command - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.com - * @since 1.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class SchemaValidatorCommand extends Console\Command\Command -{ - /** - * @see Console\Command\Command - */ - protected function configure() - { - $this - ->setName('orm:validate-schema') - ->setDescription('Validate that the mapping files.') - ->setHelp(<<getHelper('em')->getEntityManager(); - - $validator = new \Doctrine\ORM\Tools\SchemaValidator($em); - $errors = $validator->validateMapping(); - - if ($errors) { - foreach ($errors AS $className => $errorMessages) { - $output->write("The entity-class '" . $className . "' is invalid:\n"); - foreach ($errorMessages AS $errorMessage) { - $output->write('* ' . $errorMessage . "\n"); - } - $output->write("\n"); - } - } - - if (!$validator->schemaInSyncWithMetadata()) { - $output->write('The database schema is not in sync with the current mapping file.'); - } - } -} \ No newline at end of file