【发布时间】:2014-07-20 07:43:36
【问题描述】:
教义:fixtures:load 命令上的--no-interaction 标志无法在 Symfony 命令中运行。但是它正在通过终端工作。我说的对吗?
当我从包中运行它时:
/**
* Loads the fixtures
* @param \Symfony\Component\Console\Output\OutputInterface $oOutput
* @return \Symfony\Component\Console\Output\OutputInterface
*/
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;
}
系统提示我加载固定装置
但是运行这个:
php app/console doctrine:fixtures:load --no-interaction
不提示我。
我做错了什么?
【问题讨论】:
标签: symfony doctrine-orm fixtures