doubi1931 2018-01-09 14:40
浏览 21

在Symfony-Update之后:调用一个成员函数has /)on null on / login [duplicate]

Until yesterday, my symfony application works fine. It was Symfony 2.8.32, Userbundle Version dev-master.

3 Weeks ago, I make a composer update - all works still fine.

Today I do the same, the Symfony version is now 2.8.33, and now on trying login I get:

Call to a member function has() on null in vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php at line 18

The code at this point is:

  if ($this->container->has('templating')) {
            return $this->container->get('templating')->renderResponse($view, $parameters, $response);
        }

It seems, something in Userbundle isn't changing, and $this->container is null.

I have tried a downgrade on Symfony 2.8.32, but that does not help.

Any idea?

</div>
  • 写回答

1条回答 默认 最新

  • duanan5940 2018-01-09 14:56
    关注

    Ok, problem is solved: Write in composer.json:

    "friendsofsymfony/user-bundle": "~2.0",

    instead of "friendsofsymfony/user-bundle": "~2.0@dev",

    评论

报告相同问题?