尝试 Symfony 3.4 beta3 时出现 TemplateListener 错误
TemplateListener error when trying to Symfony 3.4 beta3
我正在尝试从 Symfony 3.3.10 迁移到 Symfony 3.4 beta3。我有以下错误:
Type error: Argument 1 passed to Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::__construct() must be an instance of Sensio\Bundle\FrameworkExtraBundle\Templating\TemplateGuesser, instance of ContainerWhrfjwe given, called in /home/coil/workspace/project/api/var/cache/dev/ContainerWhrfjwe/getDebug_EventDispatcherService.php on line 21
这是我在 composer.json
文件中修改的内容:
"symfony/symfony": "v3.4.0-BETA3",
"symfony/swiftmailer-bundle": "^2.6.4",
"sensio/framework-extra-bundle": "^5.0.0",
之前:
"symfony/symfony": "3.3.*",
"symfony/swiftmailer-bundle": "^2.3.10",
"sensio/framework-extra-bundle": "^3.0.2",
(other lines where indentical)
composer 命令运行没有错误。但是每个页面都会引发此错误。 (即使使用 CLI)
首先 - 像往常一样,清除开发缓存,然后按照 Upgrading a Minor Version 上的说明进行尝试:
composer update symfony/symfony --with-dependencies
它也可能对运行
有用
composer outdated
查看其他哪些捆绑包(至少列在顶层)也已过时。
我正在尝试从 Symfony 3.3.10 迁移到 Symfony 3.4 beta3。我有以下错误:
Type error: Argument 1 passed to Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::__construct() must be an instance of Sensio\Bundle\FrameworkExtraBundle\Templating\TemplateGuesser, instance of ContainerWhrfjwe given, called in /home/coil/workspace/project/api/var/cache/dev/ContainerWhrfjwe/getDebug_EventDispatcherService.php on line 21
这是我在 composer.json
文件中修改的内容:
"symfony/symfony": "v3.4.0-BETA3",
"symfony/swiftmailer-bundle": "^2.6.4",
"sensio/framework-extra-bundle": "^5.0.0",
之前:
"symfony/symfony": "3.3.*",
"symfony/swiftmailer-bundle": "^2.3.10",
"sensio/framework-extra-bundle": "^3.0.2",
(other lines where indentical)
composer 命令运行没有错误。但是每个页面都会引发此错误。 (即使使用 CLI)
首先 - 像往常一样,清除开发缓存,然后按照 Upgrading a Minor Version 上的说明进行尝试:
composer update symfony/symfony --with-dependencies
它也可能对运行
有用composer outdated
查看其他哪些捆绑包(至少列在顶层)也已过时。