我已将Symfony从3.2升级到3.3。我已经这样做了:https://github.com/symfony/symfony/blob/master/UPGRADE-3.3.md
但现在,我有这个错误:
类型错误:传递给AppBundle \ EventListener \ ForumListener :: __ construct()的参数2必须是Symfony \ Component \ Cache \ Adapter \ FilesystemAdapter的实例,Symfony \ Component \ Cache \ Adapter \ TraceableAdapter的实例给出,调用第612行的/var/www/symfony/WikiSport/var/cache/dev/appDevDebugProjectContainer.php
我不明白,因为在UPGRADE-3.3.md中,没有关于FilesystemAdapter或TraceableAdapter的信息。
ForumListener.php:
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
class ForumListener
{
private $cache;
public function __construct(EntityManager $entityManager, FilesystemAdapter $cache)
{
$this->entityManager = $entityManager;
$this->cache = $cache;
}
和services.yml:
app.forum_listener:
class: AppBundle\EventListener\ForumListener
autowire: true
public: true
tags:
- { name: kernel.event_listener, event: kernel.controller, method: onKernelController }
你能帮帮我吗?非常感谢你:))