Permalink
Browse files

make fixture loading interactive

  • Loading branch information...
1 parent 9ff404c commit 8d56d7ba613fa2b6720f70081f7858c523f791d0 @lsmith77 lsmith77 committed Oct 13, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 Command/LoadFixtureCommand.php
@@ -71,6 +71,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
$registry = $this->getContainer()->get('doctrine_phpcr');
$dm = $registry->getManager($input->getOption('name'));
+ if ($input->isInteractive() && !$input->getOption('append')) {
+ $dialog = $this->getHelperSet()->get('dialog');
+ if (!$dialog->askConfirmation($output, '<question>Careful, database will be purged. Do you want to continue Y/N ?</question>', false)) {
+ return;
+ }
+ }
+
$dirOrFile = $input->getOption('fixtures');
if ($dirOrFile) {
$paths = is_array($dirOrFile) ? $dirOrFile : array($dirOrFile);

0 comments on commit 8d56d7b

Please sign in to comment.