我正在从 symofony 2.7 迁移到 symfony 4.0。成功地我迁移了一个包。现在我正在迁移第二个捆绑包,并且出现错误消息。我完全没有得到 symfony 4.0 想要从我这里得到的东西。
如果我打开autowire: true
此错误消息将出现。
Cannot autowire service "App\Kernel": argument "$environment" of method "Symfony\Component\HttpKernel\Kernel::__construct()" must have a type-hint or be given a value explicitly.
有人可以帮助我吗?
如果我将其关闭,则不会出现任何消息。
更新
我只在 bundles.php 中注册了我的包
App\Backend\AccountBundle\BackendAccountBundle::class => ['all' => true],