Php 控制器上的Symfony命令生成“最大执行时间”

Php 控制器上的Symfony命令生成“最大执行时间”,php,symfony,console,Php,Symfony,Console,我在控制器中使用了这个代码段 $app = new Application($this->container->get('kernel')); $input = new StringInput('generate:doctrine:entity --no-interaction --entity=ModelBundle:MyTest --fields="title:string(100)"'); $output = new StreamOutput(fopen('php://tem

我在控制器中使用了这个代码段

$app = new Application($this->container->get('kernel'));

$input = new StringInput('generate:doctrine:entity --no-interaction --entity=ModelBundle:MyTest --fields="title:string(100)"');
$output = new StreamOutput(fopen('php://temp', 'w'));

$app->doRun($input, $output);
它触发了错误:超过了30秒的最大执行时间,我将最大执行时间增加到100秒,但仍然得到了相同的错误

我在CLI中尝试了相同的命令,效果很好

我在我的控制器中替换了命令generate:doctrine:entity by container:debug,我没有得到错误的最大执行时间

$input = new StringInput('container:debug');
我正在使用Symfony 2.6.1


有什么提示吗?

可能您正在调用的命令需要一些用户输入

不确定您想做什么,但您是否尝试过简单的exec或passthru调用