Use addOption()/addArgument() to configure commands
In order to simplify and standardise the definition of the commands.
This commit is contained in:
parent
ba32237e2b
commit
214dc9896b
@ -19,13 +19,13 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command\ClearCache;
|
||||
|
||||
use Doctrine\ORM\Cache;
|
||||
use Doctrine\ORM\Cache\Region\DefaultRegion;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Doctrine\ORM\Cache\Region\DefaultRegion;
|
||||
use Doctrine\ORM\Cache;
|
||||
|
||||
/**
|
||||
* Command to clear a collection cache region.
|
||||
@ -40,17 +40,14 @@ class CollectionRegionCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:clear-cache:region:collection')
|
||||
->setDescription('Clear a second-level cache collection region.')
|
||||
$this->setName('orm:clear-cache:region:collection')
|
||||
->setDescription('Clear a second-level cache collection region')
|
||||
->addArgument('owner-class', InputArgument::OPTIONAL, 'The owner entity name.')
|
||||
->addArgument('association', InputArgument::OPTIONAL, 'The association collection name.')
|
||||
->addArgument('owner-id', InputArgument::OPTIONAL, 'The owner identifier.')
|
||||
->addOption('all', null, InputOption::VALUE_NONE, 'If defined, all entity regions will be deleted/invalidated.')
|
||||
->addOption('flush', null, InputOption::VALUE_NONE, 'If defined, all cache entries will be flushed.');
|
||||
|
||||
|
||||
$this->setHelp(<<<EOT
|
||||
->addOption('flush', null, InputOption::VALUE_NONE, 'If defined, all cache entries will be flushed.')
|
||||
->setHelp(<<<EOT
|
||||
The <info>%command.name%</info> command is meant to clear a second-level cache collection regions for an associated Entity Manager.
|
||||
It is possible to delete/invalidate all collection region, a specific collection region or flushes the cache provider.
|
||||
|
||||
@ -92,7 +89,7 @@ EOT
|
||||
throw new \InvalidArgumentException('No second-level cache is configured on the given EntityManager.');
|
||||
}
|
||||
|
||||
if ( (! $ownerClass || ! $assoc) && ! $input->getOption('all')) {
|
||||
if (( ! $ownerClass || ! $assoc) && ! $input->getOption('all')) {
|
||||
throw new \InvalidArgumentException('Missing arguments "--owner-class" "--association"');
|
||||
}
|
||||
|
||||
|
@ -19,13 +19,13 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command\ClearCache;
|
||||
|
||||
use Doctrine\ORM\Cache;
|
||||
use Doctrine\ORM\Cache\Region\DefaultRegion;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Doctrine\ORM\Cache\Region\DefaultRegion;
|
||||
use Doctrine\ORM\Cache;
|
||||
|
||||
/**
|
||||
* Command to clear a entity cache region.
|
||||
@ -40,16 +40,13 @@ class EntityRegionCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:clear-cache:region:entity')
|
||||
->setDescription('Clear a second-level cache entity region.')
|
||||
$this->setName('orm:clear-cache:region:entity')
|
||||
->setDescription('Clear a second-level cache entity region')
|
||||
->addArgument('entity-class', InputArgument::OPTIONAL, 'The entity name.')
|
||||
->addArgument('entity-id', InputArgument::OPTIONAL, 'The entity identifier.')
|
||||
->addOption('all', null, InputOption::VALUE_NONE, 'If defined, all entity regions will be deleted/invalidated.')
|
||||
->addOption('flush', null, InputOption::VALUE_NONE, 'If defined, all cache entries will be flushed.');
|
||||
|
||||
|
||||
$this->setHelp(<<<EOT
|
||||
->addOption('flush', null, InputOption::VALUE_NONE, 'If defined, all cache entries will be flushed.')
|
||||
->setHelp(<<<EOT
|
||||
The <info>%command.name%</info> command is meant to clear a second-level cache entity region for an associated Entity Manager.
|
||||
It is possible to delete/invalidate all entity region, a specific entity region or flushes the cache provider.
|
||||
|
||||
|
@ -19,12 +19,12 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command\ClearCache;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Doctrine\Common\Cache\ApcCache;
|
||||
use Doctrine\Common\Cache\XcacheCache;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* Command to clear the metadata cache of the various cache drivers.
|
||||
@ -43,19 +43,10 @@ class MetadataCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:clear-cache:metadata')
|
||||
->setDescription('Clear all metadata cache of the various cache drivers.')
|
||||
->setDefinition(
|
||||
[
|
||||
new InputOption(
|
||||
'flush', null, InputOption::VALUE_NONE,
|
||||
'If defined, cache entries will be flushed instead of deleted/invalidated.'
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
$this->setHelp(<<<EOT
|
||||
$this->setName('orm:clear-cache:metadata')
|
||||
->setDescription('Clear all metadata cache of the various cache drivers')
|
||||
->addOption('flush', null, InputOption::VALUE_NONE, 'If defined, cache entries will be flushed instead of deleted/invalidated.')
|
||||
->setHelp(<<<EOT
|
||||
The <info>%command.name%</info> command is meant to clear the metadata cache of associated Entity Manager.
|
||||
It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider
|
||||
instance completely.
|
||||
|
@ -19,12 +19,12 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command\ClearCache;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Doctrine\Common\Cache\ApcCache;
|
||||
use Doctrine\Common\Cache\XcacheCache;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* Command to clear the query cache of the various cache drivers.
|
||||
@ -43,19 +43,10 @@ class QueryCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:clear-cache:query')
|
||||
->setDescription('Clear all query cache of the various cache drivers.')
|
||||
->setDefinition(
|
||||
[
|
||||
new InputOption(
|
||||
'flush', null, InputOption::VALUE_NONE,
|
||||
'If defined, cache entries will be flushed instead of deleted/invalidated.'
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
$this->setHelp(<<<EOT
|
||||
$this->setName('orm:clear-cache:query')
|
||||
->setDescription('Clear all query cache of the various cache drivers')
|
||||
->addOption('flush', null, InputOption::VALUE_NONE, 'If defined, cache entries will be flushed instead of deleted/invalidated.')
|
||||
->setHelp(<<<EOT
|
||||
The <info>%command.name%</info> command is meant to clear the query cache of associated Entity Manager.
|
||||
It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider
|
||||
instance completely.
|
||||
|
@ -19,13 +19,13 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command\ClearCache;
|
||||
|
||||
use Doctrine\ORM\Cache;
|
||||
use Doctrine\ORM\Cache\Region\DefaultRegion;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Doctrine\ORM\Cache\Region\DefaultRegion;
|
||||
use Doctrine\ORM\Cache;
|
||||
|
||||
/**
|
||||
* Command to clear a query cache region.
|
||||
@ -40,15 +40,12 @@ class QueryRegionCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:clear-cache:region:query')
|
||||
->setDescription('Clear a second-level cache query region.')
|
||||
$this->setName('orm:clear-cache:region:query')
|
||||
->setDescription('Clear a second-level cache query region')
|
||||
->addArgument('region-name', InputArgument::OPTIONAL, 'The query region to clear.')
|
||||
->addOption('all', null, InputOption::VALUE_NONE, 'If defined, all query regions will be deleted/invalidated.')
|
||||
->addOption('flush', null, InputOption::VALUE_NONE, 'If defined, all cache entries will be flushed.');
|
||||
|
||||
|
||||
$this->setHelp(<<<EOT
|
||||
->addOption('flush', null, InputOption::VALUE_NONE, 'If defined, all cache entries will be flushed.')
|
||||
->setHelp(<<<EOT
|
||||
The <info>%command.name%</info> command is meant to clear a second-level cache query region for an associated Entity Manager.
|
||||
It is possible to delete/invalidate all query region, a specific query region or flushes the cache provider.
|
||||
|
||||
|
@ -19,12 +19,12 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command\ClearCache;
|
||||
|
||||
use Doctrine\Common\Cache\ApcCache;
|
||||
use Doctrine\Common\Cache\XcacheCache;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Doctrine\Common\Cache\ApcCache;
|
||||
use Doctrine\Common\Cache\XcacheCache;
|
||||
|
||||
/**
|
||||
* Command to clear the result cache of the various cache drivers.
|
||||
@ -43,19 +43,10 @@ class ResultCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:clear-cache:result')
|
||||
->setDescription('Clear all result cache of the various cache drivers.')
|
||||
->setDefinition(
|
||||
[
|
||||
new InputOption(
|
||||
'flush', null, InputOption::VALUE_NONE,
|
||||
'If defined, cache entries will be flushed instead of deleted/invalidated.'
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
$this->setHelp(<<<EOT
|
||||
$this->setName('orm:clear-cache:result')
|
||||
->setDescription('Clear all result cache of the various cache drivers')
|
||||
->addOption('flush', null, InputOption::VALUE_NONE, 'If defined, cache entries will be flushed instead of deleted/invalidated.')
|
||||
->setHelp(<<<EOT
|
||||
The <info>%command.name%</info> command is meant to clear the result cache of associated Entity Manager.
|
||||
It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider
|
||||
instance completely.
|
||||
|
@ -19,14 +19,14 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Doctrine\ORM\Tools\Export\ClassMetadataExporter;
|
||||
use Doctrine\ORM\Tools\ConvertDoctrine1Schema;
|
||||
use Doctrine\ORM\Tools\EntityGenerator;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Doctrine\ORM\Tools\Export\ClassMetadataExporter;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* Command to convert a Doctrine 1 schema to a Doctrine 2 mapping file.
|
||||
@ -99,41 +99,16 @@ class ConvertDoctrine1SchemaCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:convert-d1-schema')
|
||||
$this->setName('orm:convert-d1-schema')
|
||||
->setAliases(['orm:convert:d1-schema'])
|
||||
->setDescription('Converts Doctrine 1.X schema into a Doctrine 2.X schema.')
|
||||
->setDefinition(
|
||||
[
|
||||
new InputArgument(
|
||||
'from-path', InputArgument::REQUIRED, 'The path of Doctrine 1.X schema information.'
|
||||
),
|
||||
new InputArgument(
|
||||
'to-type', InputArgument::REQUIRED, 'The destination Doctrine 2.X mapping type.'
|
||||
),
|
||||
new InputArgument(
|
||||
'dest-path', InputArgument::REQUIRED,
|
||||
'The path to generate your Doctrine 2.X mapping information.'
|
||||
),
|
||||
new InputOption(
|
||||
'from', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
|
||||
'Optional paths of Doctrine 1.X schema information.',
|
||||
[]
|
||||
),
|
||||
new InputOption(
|
||||
'extend', null, InputOption::VALUE_OPTIONAL,
|
||||
'Defines a base class to be extended by generated entity classes.'
|
||||
),
|
||||
new InputOption(
|
||||
'num-spaces', null, InputOption::VALUE_OPTIONAL,
|
||||
'Defines the number of indentation spaces', 4
|
||||
)
|
||||
]
|
||||
)
|
||||
->setHelp(<<<EOT
|
||||
Converts Doctrine 1.X schema into a Doctrine 2.X schema.
|
||||
EOT
|
||||
);
|
||||
->setDescription('Converts Doctrine 1.x schema into a Doctrine 2.x schema')
|
||||
->addArgument('from-path', InputArgument::REQUIRED, 'The path of Doctrine 1.X schema information.')
|
||||
->addArgument('to-type', InputArgument::REQUIRED, 'The destination Doctrine 2.X mapping type.')
|
||||
->addArgument('dest-path', InputArgument::REQUIRED, 'The path to generate your Doctrine 2.X mapping information.')
|
||||
->addOption('from', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Optional paths of Doctrine 1.X schema information.', [])
|
||||
->addOption('extend', null, InputOption::VALUE_OPTIONAL, 'Defines a base class to be extended by generated entity classes.')
|
||||
->addOption('num-spaces', null, InputOption::VALUE_OPTIONAL, 'Defines the number of indentation spaces', 4)
|
||||
->setHelp('Converts Doctrine 1.x schema into a Doctrine 2.x schema.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -19,16 +19,16 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Doctrine\ORM\Tools\Console\MetadataFilter;
|
||||
use Doctrine\ORM\Tools\Export\ClassMetadataExporter;
|
||||
use Doctrine\ORM\Tools\EntityGenerator;
|
||||
use Doctrine\ORM\Tools\DisconnectedClassMetadataFactory;
|
||||
use Doctrine\ORM\Mapping\Driver\DatabaseDriver;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Doctrine\ORM\Tools\Console\MetadataFilter;
|
||||
use Doctrine\ORM\Tools\DisconnectedClassMetadataFactory;
|
||||
use Doctrine\ORM\Tools\EntityGenerator;
|
||||
use Doctrine\ORM\Tools\Export\ClassMetadataExporter;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* Command to convert your mapping information between the various formats.
|
||||
@ -47,44 +47,17 @@ class ConvertMappingCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:convert-mapping')
|
||||
$this->setName('orm:convert-mapping')
|
||||
->setAliases(['orm:convert:mapping'])
|
||||
->setDescription('Convert mapping information between supported formats.')
|
||||
->setDefinition(
|
||||
[
|
||||
new InputOption(
|
||||
'filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
|
||||
'A string pattern used to match entities that should be processed.'
|
||||
),
|
||||
new InputArgument(
|
||||
'to-type', InputArgument::REQUIRED, 'The mapping type to be converted.'
|
||||
),
|
||||
new InputArgument(
|
||||
'dest-path', InputArgument::REQUIRED,
|
||||
'The path to generate your entities classes.'
|
||||
),
|
||||
new InputOption(
|
||||
'force', 'f', InputOption::VALUE_NONE,
|
||||
'Force to overwrite existing mapping files.'
|
||||
),
|
||||
new InputOption(
|
||||
'from-database', null, null, 'Whether or not to convert mapping information from existing database.'
|
||||
),
|
||||
new InputOption(
|
||||
'extend', null, InputOption::VALUE_OPTIONAL,
|
||||
'Defines a base class to be extended by generated entity classes.'
|
||||
),
|
||||
new InputOption(
|
||||
'num-spaces', null, InputOption::VALUE_OPTIONAL,
|
||||
'Defines the number of indentation spaces', 4
|
||||
),
|
||||
new InputOption(
|
||||
'namespace', null, InputOption::VALUE_OPTIONAL,
|
||||
'Defines a namespace for the generated entity classes, if converted from database.'
|
||||
),
|
||||
]
|
||||
)
|
||||
->setDescription('Convert mapping information between supported formats')
|
||||
->addArgument('to-type', InputArgument::REQUIRED, 'The mapping type to be converted.')
|
||||
->addArgument('dest-path', InputArgument::REQUIRED, 'The path to generate your entities classes.')
|
||||
->addOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match entities that should be processed.')
|
||||
->addOption('force', 'f', InputOption::VALUE_NONE, 'Force to overwrite existing mapping files.')
|
||||
->addOption('from-database', null, null, 'Whether or not to convert mapping information from existing database.')
|
||||
->addOption('extend', null, InputOption::VALUE_OPTIONAL, 'Defines a base class to be extended by generated entity classes.')
|
||||
->addOption('num-spaces', null, InputOption::VALUE_OPTIONAL, 'Defines the number of indentation spaces', 4)
|
||||
->addOption('namespace', null, InputOption::VALUE_OPTIONAL, 'Defines a namespace for the generated entity classes, if converted from database.')
|
||||
->setHelp(<<<EOT
|
||||
Convert mapping information between supported formats.
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
namespace Doctrine\ORM\Tools\Console\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Throwable;
|
||||
|
||||
@ -43,21 +43,10 @@ class EnsureProductionSettingsCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:ensure-production-settings')
|
||||
->setDescription('Verify that Doctrine is properly configured for a production environment.')
|
||||
->setDefinition(
|
||||
[
|
||||
new InputOption(
|
||||
'complete', null, InputOption::VALUE_NONE,
|
||||
'Flag to also inspect database connection existence.'
|
||||
)
|
||||
]
|
||||
)
|
||||
->setHelp(<<<EOT
|
||||
Verify that Doctrine is properly configured for a production environment.
|
||||
EOT
|
||||
);
|
||||
$this->setName('orm:ensure-production-settings')
|
||||
->setDescription('Verify that Doctrine is properly configured for a production environment')
|
||||
->addOption('complete', null, InputOption::VALUE_NONE, 'Flag to also inspect database connection existence.')
|
||||
->setHelp('Verify that Doctrine is properly configured for a production environment.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -19,14 +19,14 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Doctrine\ORM\Tools\Console\MetadataFilter;
|
||||
use Doctrine\ORM\Tools\EntityGenerator;
|
||||
use Doctrine\ORM\Tools\DisconnectedClassMetadataFactory;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Doctrine\ORM\Tools\EntityGenerator;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* Command to generate entity classes and method stubs from your mapping information.
|
||||
@ -45,49 +45,18 @@ class GenerateEntitiesCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:generate-entities')
|
||||
$this->setName('orm:generate-entities')
|
||||
->setAliases(['orm:generate:entities'])
|
||||
->setDescription('Generate entity classes and method stubs from your mapping information.')
|
||||
->setDefinition(
|
||||
[
|
||||
new InputOption(
|
||||
'filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
|
||||
'A string pattern used to match entities that should be processed.'
|
||||
),
|
||||
new InputArgument(
|
||||
'dest-path', InputArgument::REQUIRED, 'The path to generate your entity classes.'
|
||||
),
|
||||
new InputOption(
|
||||
'generate-annotations', null, InputOption::VALUE_OPTIONAL,
|
||||
'Flag to define if generator should generate annotation metadata on entities.', false
|
||||
),
|
||||
new InputOption(
|
||||
'generate-methods', null, InputOption::VALUE_OPTIONAL,
|
||||
'Flag to define if generator should generate stub methods on entities.', true
|
||||
),
|
||||
new InputOption(
|
||||
'regenerate-entities', null, InputOption::VALUE_OPTIONAL,
|
||||
'Flag to define if generator should regenerate entity if it exists.', false
|
||||
),
|
||||
new InputOption(
|
||||
'update-entities', null, InputOption::VALUE_OPTIONAL,
|
||||
'Flag to define if generator should only update entity if it exists.', true
|
||||
),
|
||||
new InputOption(
|
||||
'extend', null, InputOption::VALUE_REQUIRED,
|
||||
'Defines a base class to be extended by generated entity classes.'
|
||||
),
|
||||
new InputOption(
|
||||
'num-spaces', null, InputOption::VALUE_REQUIRED,
|
||||
'Defines the number of indentation spaces', 4
|
||||
),
|
||||
new InputOption(
|
||||
'no-backup', null, InputOption::VALUE_NONE,
|
||||
'Flag to define if generator should avoid backuping existing entity file if it exists.'
|
||||
)
|
||||
]
|
||||
)
|
||||
->setDescription('Generate entity classes and method stubs from your mapping information')
|
||||
->addArgument('dest-path', InputArgument::REQUIRED, 'The path to generate your entity classes.')
|
||||
->addOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match entities that should be processed.')
|
||||
->addOption('generate-annotations', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should generate annotation metadata on entities.', false)
|
||||
->addOption('generate-methods', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should generate stub methods on entities.', true)
|
||||
->addOption('regenerate-entities', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should regenerate entity if it exists.', false)
|
||||
->addOption('update-entities', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should only update entity if it exists.', true)
|
||||
->addOption('extend', null, InputOption::VALUE_REQUIRED, 'Defines a base class to be extended by generated entity classes.')
|
||||
->addOption('num-spaces', null, InputOption::VALUE_REQUIRED, 'Defines the number of indentation spaces', 4)
|
||||
->addOption('no-backup', null, InputOption::VALUE_NONE, 'Flag to define if generator should avoid backuping existing entity file if it exists.')
|
||||
->setHelp(<<<EOT
|
||||
Generate entity classes and method stubs from your mapping information.
|
||||
|
||||
@ -139,7 +108,6 @@ EOT
|
||||
}
|
||||
|
||||
if (count($metadatas)) {
|
||||
// Create EntityGenerator
|
||||
$entityGenerator = new EntityGenerator();
|
||||
|
||||
$entityGenerator->setGenerateAnnotations($input->getOption('generate-annotations'));
|
||||
|
@ -19,12 +19,13 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\Tools\Console\MetadataFilter;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* Command to (re)generate the proxy classes used by doctrine.
|
||||
@ -43,26 +44,12 @@ class GenerateProxiesCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:generate-proxies')
|
||||
$this->setName('orm:generate-proxies')
|
||||
->setAliases(['orm:generate:proxies'])
|
||||
->setDescription('Generates proxy classes for entity classes.')
|
||||
->setDefinition(
|
||||
[
|
||||
new InputOption(
|
||||
'filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
|
||||
'A string pattern used to match entities that should be processed.'
|
||||
),
|
||||
new InputArgument(
|
||||
'dest-path', InputArgument::OPTIONAL,
|
||||
'The path to generate your proxy classes. If none is provided, it will attempt to grab from configuration.'
|
||||
),
|
||||
]
|
||||
)
|
||||
->setHelp(<<<EOT
|
||||
Generates proxy classes for entity classes.
|
||||
EOT
|
||||
);
|
||||
->setDescription('Generates proxy classes for entity classes')
|
||||
->addArgument('dest-path', InputArgument::OPTIONAL, 'The path to generate your proxy classes. If none is provided, it will attempt to grab from configuration.')
|
||||
->addOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match entities that should be processed.')
|
||||
->setHelp('Generates proxy classes for entity classes.');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -70,6 +57,7 @@ EOT
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
/** @var EntityManagerInterface $em */
|
||||
$em = $this->getHelper('em')->getEntityManager();
|
||||
|
||||
$metadatas = $em->getMetadataFactory()->getAllMetadata();
|
||||
|
@ -19,13 +19,13 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Doctrine\ORM\Tools\Console\MetadataFilter;
|
||||
use Doctrine\ORM\Tools\EntityRepositoryGenerator;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* Command to generate repository classes for mapping information.
|
||||
@ -44,25 +44,12 @@ class GenerateRepositoriesCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:generate-repositories')
|
||||
$this->setName('orm:generate-repositories')
|
||||
->setAliases(['orm:generate:repositories'])
|
||||
->setDescription('Generate repository classes from your mapping information.')
|
||||
->setDefinition(
|
||||
[
|
||||
new InputOption(
|
||||
'filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
|
||||
'A string pattern used to match entities that should be processed.'
|
||||
),
|
||||
new InputArgument(
|
||||
'dest-path', InputArgument::REQUIRED, 'The path to generate your repository classes.'
|
||||
)
|
||||
]
|
||||
)
|
||||
->setHelp(<<<EOT
|
||||
Generate repository classes from your mapping information.
|
||||
EOT
|
||||
);
|
||||
->setDescription('Generate repository classes from your mapping information')
|
||||
->addArgument('dest-path', InputArgument::REQUIRED, 'The path to generate your repository classes.')
|
||||
->addOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match entities that should be processed.')
|
||||
->setHelp('Generate repository classes from your mapping information.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -20,9 +20,9 @@
|
||||
namespace Doctrine\ORM\Tools\Console\Command;
|
||||
|
||||
use Doctrine\ORM\Mapping\MappingException;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
|
||||
/**
|
||||
* Show information about mapped entities.
|
||||
@ -38,8 +38,7 @@ class InfoCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:info')
|
||||
$this->setName('orm:info')
|
||||
->setDescription('Show basic information about all mapped entities')
|
||||
->setHelp(<<<EOT
|
||||
The <info>%command.name%</info> shows basic information about which
|
||||
@ -61,7 +60,7 @@ EOT
|
||||
->getMetadataDriverImpl()
|
||||
->getAllClassNames();
|
||||
|
||||
if (!$entityClassNames) {
|
||||
if ( ! $entityClassNames) {
|
||||
throw new \Exception(
|
||||
'You do not have any mapped Doctrine ORM entities according to the current configuration. '.
|
||||
'If you have entities or mapping files you should check your mapping configuration for errors.'
|
||||
|
@ -41,8 +41,7 @@ final class MappingDescribeCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:mapping:describe')
|
||||
$this->setName('orm:mapping:describe')
|
||||
->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity')
|
||||
->setDescription('Display information about mapped objects')
|
||||
->setHelp(<<<EOT
|
||||
@ -138,8 +137,7 @@ EOT
|
||||
*/
|
||||
private function getMappedEntities(EntityManagerInterface $entityManager)
|
||||
{
|
||||
$entityClassNames = $entityManager
|
||||
->getConfiguration()
|
||||
$entityClassNames = $entityManager->getConfiguration()
|
||||
->getMetadataDriverImpl()
|
||||
->getAllClassNames();
|
||||
|
||||
|
@ -19,12 +19,12 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command;
|
||||
|
||||
use Doctrine\Common\Util\Debug;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Doctrine\Common\Util\Debug;
|
||||
|
||||
/**
|
||||
* Command to execute DQL queries in a given EntityManager.
|
||||
@ -43,39 +43,15 @@ class RunDqlCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:run-dql')
|
||||
->setDescription('Executes arbitrary DQL directly from the command line.')
|
||||
->setDefinition(
|
||||
[
|
||||
new InputArgument('dql', InputArgument::REQUIRED, 'The DQL to execute.'),
|
||||
new InputOption(
|
||||
'hydrate', null, InputOption::VALUE_REQUIRED,
|
||||
'Hydration mode of result set. Should be either: object, array, scalar or single-scalar.',
|
||||
'object'
|
||||
),
|
||||
new InputOption(
|
||||
'first-result', null, InputOption::VALUE_REQUIRED,
|
||||
'The first result in the result set.'
|
||||
),
|
||||
new InputOption(
|
||||
'max-result', null, InputOption::VALUE_REQUIRED,
|
||||
'The maximum number of results in the result set.'
|
||||
),
|
||||
new InputOption(
|
||||
'depth', null, InputOption::VALUE_REQUIRED,
|
||||
'Dumping depth of Entity graph.', 7
|
||||
),
|
||||
new InputOption(
|
||||
'show-sql', null, InputOption::VALUE_NONE,
|
||||
'Dump generated SQL instead of executing query'
|
||||
)
|
||||
]
|
||||
)
|
||||
->setHelp(<<<EOT
|
||||
Executes arbitrary DQL directly from the command line.
|
||||
EOT
|
||||
);
|
||||
$this->setName('orm:run-dql')
|
||||
->setDescription('Executes arbitrary DQL directly from the command line')
|
||||
->addArgument('dql', InputArgument::REQUIRED, 'The DQL to execute.')
|
||||
->addOption('hydrate', null, InputOption::VALUE_REQUIRED, 'Hydration mode of result set. Should be either: object, array, scalar or single-scalar.', 'object')
|
||||
->addOption('first-result', null, InputOption::VALUE_REQUIRED, 'The first result in the result set.')
|
||||
->addOption('max-result', null, InputOption::VALUE_REQUIRED, 'The maximum number of results in the result set.')
|
||||
->addOption('depth', null, InputOption::VALUE_REQUIRED, 'Dumping depth of Entity graph.', 7)
|
||||
->addOption('show-sql', null, InputOption::VALUE_NONE, 'Dump generated SQL instead of executing query')
|
||||
->setHelp('Executes arbitrary DQL directly from the command line.');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -87,13 +63,13 @@ EOT
|
||||
$em = $this->getHelper('em')->getEntityManager();
|
||||
|
||||
if (($dql = $input->getArgument('dql')) === null) {
|
||||
throw new \RuntimeException("Argument 'DQL' is required in order to execute this command correctly.");
|
||||
throw new \RuntimeException("Argument 'dql' is required in order to execute this command correctly.");
|
||||
}
|
||||
|
||||
$depth = $input->getOption('depth');
|
||||
|
||||
if ( ! is_numeric($depth)) {
|
||||
throw new \LogicException("Option 'depth' must contains an integer value");
|
||||
throw new \LogicException("Option 'depth' must contain an integer value");
|
||||
}
|
||||
|
||||
$hydrationModeName = $input->getOption('hydrate');
|
||||
@ -109,7 +85,7 @@ EOT
|
||||
|
||||
if (($firstResult = $input->getOption('first-result')) !== null) {
|
||||
if ( ! is_numeric($firstResult)) {
|
||||
throw new \LogicException("Option 'first-result' must contains an integer value");
|
||||
throw new \LogicException("Option 'first-result' must contain an integer value");
|
||||
}
|
||||
|
||||
$query->setFirstResult((int) $firstResult);
|
||||
@ -117,7 +93,7 @@ EOT
|
||||
|
||||
if (($maxResult = $input->getOption('max-result')) !== null) {
|
||||
if ( ! is_numeric($maxResult)) {
|
||||
throw new \LogicException("Option 'max-result' must contains an integer value");
|
||||
throw new \LogicException("Option 'max-result' must contain an integer value");
|
||||
}
|
||||
|
||||
$query->setMaxResults((int) $maxResult);
|
||||
|
@ -19,10 +19,10 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command\SchemaTool;
|
||||
|
||||
use Doctrine\ORM\Tools\SchemaTool;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Doctrine\ORM\Tools\SchemaTool;
|
||||
|
||||
/**
|
||||
* Base class for CreateCommand, DropCommand and UpdateCommand.
|
||||
|
@ -19,10 +19,10 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command\SchemaTool;
|
||||
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Doctrine\ORM\Tools\SchemaTool;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* Command to create the database schema for a set of classes based on their mappings.
|
||||
@ -41,19 +41,9 @@ class CreateCommand extends AbstractCommand
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:schema-tool:create')
|
||||
->setDescription(
|
||||
'Processes the schema and either create it directly on EntityManager Storage Connection or generate the SQL output.'
|
||||
)
|
||||
->setDefinition(
|
||||
[
|
||||
new InputOption(
|
||||
'dump-sql', null, InputOption::VALUE_NONE,
|
||||
'Instead of trying to apply generated SQLs into EntityManager Storage Connection, output them.'
|
||||
)
|
||||
]
|
||||
)
|
||||
$this->setName('orm:schema-tool:create')
|
||||
->setDescription('Processes the schema and either create it directly on EntityManager Storage Connection or generate the SQL output')
|
||||
->addOption('dump-sql', null, InputOption::VALUE_NONE, 'Instead of trying to apply generated SQLs into EntityManager Storage Connection, output them.')
|
||||
->setHelp(<<<EOT
|
||||
Processes the schema and either create it directly on EntityManager Storage Connection or generate the SQL output.
|
||||
|
||||
|
@ -19,10 +19,10 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command\SchemaTool;
|
||||
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Doctrine\ORM\Tools\SchemaTool;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* Command to drop the database schema for a set of classes based on their mappings.
|
||||
@ -41,27 +41,11 @@ class DropCommand extends AbstractCommand
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:schema-tool:drop')
|
||||
->setDescription(
|
||||
'Drop the complete database schema of EntityManager Storage Connection or generate the corresponding SQL output.'
|
||||
)
|
||||
->setDefinition(
|
||||
[
|
||||
new InputOption(
|
||||
'dump-sql', null, InputOption::VALUE_NONE,
|
||||
'Instead of trying to apply generated SQLs into EntityManager Storage Connection, output them.'
|
||||
),
|
||||
new InputOption(
|
||||
'force', 'f', InputOption::VALUE_NONE,
|
||||
"Don't ask for the deletion of the database, but force the operation to run."
|
||||
),
|
||||
new InputOption(
|
||||
'full-database', null, InputOption::VALUE_NONE,
|
||||
'Instead of using the Class Metadata to detect the database table schema, drop ALL assets that the database contains.'
|
||||
),
|
||||
]
|
||||
)
|
||||
$this->setName('orm:schema-tool:drop')
|
||||
->setDescription('Drop the complete database schema of EntityManager Storage Connection or generate the corresponding SQL output')
|
||||
->addOption('dump-sql', null, InputOption::VALUE_NONE, 'Instead of trying to apply generated SQLs into EntityManager Storage Connection, output them.')
|
||||
->addOption('force', 'f', InputOption::VALUE_NONE, "Don't ask for the deletion of the database, but force the operation to run.")
|
||||
->addOption('full-database', null, InputOption::VALUE_NONE, 'Instead of using the Class Metadata to detect the database table schema, drop ALL assets that the database contains.')
|
||||
->setHelp(<<<EOT
|
||||
Processes the schema and either drop the database schema of EntityManager Storage Connection or generate the SQL output.
|
||||
Beware that the complete database is dropped by this command, even tables that are not relevant to your metadata model.
|
||||
|
@ -19,10 +19,10 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command\SchemaTool;
|
||||
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Doctrine\ORM\Tools\SchemaTool;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* Command to generate the SQL needed to update the database schema to match
|
||||
@ -48,30 +48,12 @@ class UpdateCommand extends AbstractCommand
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName($this->name)
|
||||
->setDescription(
|
||||
'Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata.'
|
||||
)
|
||||
->setDefinition(
|
||||
[
|
||||
new InputOption(
|
||||
'complete', null, InputOption::VALUE_NONE,
|
||||
'If defined, all assets of the database which are not relevant to the current metadata will be dropped.'
|
||||
),
|
||||
|
||||
new InputOption(
|
||||
'dump-sql', null, InputOption::VALUE_NONE,
|
||||
'Dumps the generated SQL statements to the screen (does not execute them).'
|
||||
),
|
||||
new InputOption(
|
||||
'force', 'f', InputOption::VALUE_NONE,
|
||||
'Causes the generated SQL statements to be physically executed against your database.'
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
$this->setHelp(<<<EOT
|
||||
$this->setName($this->name)
|
||||
->setDescription('Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata')
|
||||
->addOption('complete', null, InputOption::VALUE_NONE, 'If defined, all assets of the database which are not relevant to the current metadata will be dropped.')
|
||||
->addOption('dump-sql', null, InputOption::VALUE_NONE, 'Dumps the generated SQL statements to the screen (does not execute them).')
|
||||
->addOption('force', 'f', InputOption::VALUE_NONE, 'Causes the generated SQL statements to be physically executed against your database.')
|
||||
->setHelp(<<<EOT
|
||||
The <info>%command.name%</info> command generates the SQL needed to
|
||||
synchronize the database schema with the current mapping metadata of the
|
||||
default entity manager.
|
||||
|
@ -19,11 +19,11 @@
|
||||
|
||||
namespace Doctrine\ORM\Tools\Console\Command;
|
||||
|
||||
use Doctrine\ORM\Tools\SchemaValidator;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Doctrine\ORM\Tools\SchemaValidator;
|
||||
|
||||
/**
|
||||
* Command to validate that the current mapping is valid.
|
||||
@ -43,26 +43,11 @@ class ValidateSchemaCommand extends Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('orm:validate-schema')
|
||||
->setDescription('Validate the mapping files.')
|
||||
->addOption(
|
||||
'skip-mapping',
|
||||
null,
|
||||
InputOption::VALUE_NONE,
|
||||
'Skip the mapping validation check'
|
||||
)
|
||||
->addOption(
|
||||
'skip-sync',
|
||||
null,
|
||||
InputOption::VALUE_NONE,
|
||||
'Skip checking if the mapping is in sync with the database'
|
||||
)
|
||||
->setHelp(
|
||||
<<<EOT
|
||||
'Validate that the mapping files are correct and in sync with the database.'
|
||||
EOT
|
||||
);
|
||||
$this->setName('orm:validate-schema')
|
||||
->setDescription('Validate the mapping files')
|
||||
->addOption('skip-mapping', null, InputOption::VALUE_NONE, 'Skip the mapping validation check')
|
||||
->addOption('skip-sync', null, InputOption::VALUE_NONE, 'Skip checking if the mapping is in sync with the database')
|
||||
->setHelp('Validate that the mapping files are correct and in sync with the database.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user