【发布时间】:2014-10-30 12:50:05
【问题描述】:
我正在尝试编写运行很少其他命令的 symfony2 命令。 但是当我运行时
$this->getApplication()->find('cache:clear')->run(new ArrayInput(array(
'command' => 'cache:clear',
'-e' => 'prod'
)), $output);
$output->writeln('Done clearing cache prod!');
它忽略 '-e' => 'prod' 参数给出:
Clearing the cache for the dev environment with debug true
代替:
Clearing the cache for the prod environment with debug false
【问题讨论】: