Doctrine -no-interactions flag: fixtures: load command does not work in Symfony command. It works, however, through the terminal. Will I call it right?
When I run this from the package:
protected function loadFixturesCommand($oOutput) {
$oOutput->writeln('<fg=white>Attempting to load fixtures</fg=white>');
$updateCommand = $this->getApplication()->find('doctrine:fixtures:load');
$updateArguments = array(
'command' => 'doctrine:fixtures:load',
'--no-interaction' => true,
);
$updateInput = new ArrayInput($updateArguments);
$updateCommand->run($updateInput, $oOutput);
try {
$updateCommand->run($updateInput, $oOutput);
} catch (ContextErrorException $e) {
}
return $this;
}
I will be prompted to load fixtures
But by running this:
php app/console doctrine:fixtures:load --no-interaction
Does not prompt.
What am I doing wrong?
source
share