[DoctrineBundle] changed option dir_or_file to dir-or-file
This commit is contained in:
parent
9d060340f6
commit
60b714c2d3
|
@ -109,13 +109,13 @@ The above will re-build everything and load all bundle data fixtures.
|
|||
{
|
||||
$dirOrFile = $input->getOption('and-load');
|
||||
$this->runCommand('doctrine:load-data-fixtures',
|
||||
array('--dir_or_file' => $dirOrFile, '--append' => false)
|
||||
array('--dir-or-file' => $dirOrFile, '--append' => false)
|
||||
);
|
||||
}
|
||||
else if ($input->hasOption('and-append'))
|
||||
{
|
||||
$dirOrFile = $input->getOption('and-append');
|
||||
$this->runCommand('doctrine:load-data-fixtures', array('--dir_or_file' => $dirOrFile, '--append' => true));
|
||||
$this->runCommand('doctrine:load-data-fixtures', array('--dir-or-file' => $dirOrFile, '--append' => true));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class LoadDataFixturesDoctrineCommand extends DoctrineCommand
|
|||
$this
|
||||
->setName('doctrine:load-data-fixtures')
|
||||
->setDescription('Load data fixtures to your database.')
|
||||
->addOption('dir_or_file', null, InputOption::PARAMETER_OPTIONAL | InputOption::PARAMETER_IS_ARRAY, 'The directory or file to load data fixtures from.')
|
||||
->addOption('dir-or-file', null, InputOption::PARAMETER_OPTIONAL | InputOption::PARAMETER_IS_ARRAY, 'The directory or file to load data fixtures from.')
|
||||
->addOption('append', null, InputOption::PARAMETER_OPTIONAL, 'Whether or not to append the data fixtures.', false)
|
||||
;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ class LoadDataFixturesDoctrineCommand extends DoctrineCommand
|
|||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$defaultEm = $this->container->getDoctrine_ORM_EntityManagerService();
|
||||
$dirOrFile = $input->getOption('dir_or_file');
|
||||
$dirOrFile = $input->getOption('dir-or-file');
|
||||
if ($dirOrFile)
|
||||
{
|
||||
$paths = is_array($dirOrFile) ? $dirOrFile : array($dirOrFile);
|
||||
|
|
Reference in New Issue