这个问题在这里已有答案:
直到昨天,我的symfony应用程序工作正常 . 它是 Symfony 2.8.32
,Userbundle Version dev-master .
3周前,我做了一个作曲家更新 - 所有作品仍然很好 .
今天我也这样做,Symfony版本现在 2.8.33
,现在尝试登录我得到:
在第18行的vendor / symfony / symfony / src / Symfony / Bundle / FrameworkBundle / Controller / Controller.php中调用成员函数has()on null
此时的代码是:
if ($this->container->has('templating')) {
return $this->container->get('templating')->renderResponse($view, $parameters, $response);
}
似乎,Userbundle中的某些内容没有改变, $this->container
为null .
我在 Symfony 2.8.32
尝试过降级,但这没有用 .
任何的想法?
1 回答
好的,问题解决了:写在composer.json中:
“friendsofsymfony / user-bundle”:“~2.0”,
而不是“friendsofsymfony / user-bundle”:“〜2.0@dev”,