Skip to content

Commit

Permalink
Merge pull request #113 from gnat42/master
Browse files Browse the repository at this point in the history
This provides an option to use one transaction per fixture file
  • Loading branch information
guilhermeblanco committed Nov 4, 2015
2 parents e7b514c + 31ddf1b commit 5947b44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Command/LoadDataFixturesDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ protected function configure()
->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command.')
->addOption('shard', null, InputOption::VALUE_REQUIRED, 'The shard connection to use for this command.')
->addOption('purge-with-truncate', null, InputOption::VALUE_NONE, 'Purge data by using a database-level TRUNCATE statement')
->addOption('multiple-transactions', null, InputOption::VALUE_NONE, 'Use one transaction per fixture file instead of a single transaction for all')
->setHelp(<<<EOT
The <info>doctrine:fixtures:load</info> command loads data fixtures from your bundles:
Expand Down Expand Up @@ -114,7 +115,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$executor->setLogger(function ($message) use ($output) {
$output->writeln(sprintf(' <comment>></comment> <info>%s</info>', $message));
});
$executor->execute($fixtures, $input->getOption('append'));
$executor->execute($fixtures, $input->getOption('append'),$input->getOption('multiple-transactions'));
}

/**
Expand Down

0 comments on commit 5947b44

Please sign in to comment.