Symfony3 升级时的命名空间问题

Namespace problems on Symfony3 upgrade

我目前正在尝试将我的 Symfony2 应用程序升级到 Symfony3。我有一个 SecurityController 覆盖 FOSUserBundle\SecurityController:

namespace Acme\MyBundle\Controller;

use Symfony\Component\DependencyInjection\ContainerAware;

class SecurityController extends ContainerAware
{
    // ...
}

但我得到一个 ClassNotFoundException:

Attempted to load class "ContainerAware" from namespace "Symfony\Component\DependencyInjection".
Did you forget a "use" statement for another namespace?

是否有任何我在 upgrade notes 中找不到的更改。有人能告诉我解决这个问题的方法吗?

由于此 PR 的更改,ContainerAware 已在 2.8 中弃用并在 3.0 中移除,取而代之的是 ContainerAwareTrait