使用 Composer 更新 symfony3 后 @Twig/Exception/exception_full.html.twig 中的问题 [英] Issue in @Twig/Exception/exception_full.html.twig after updating symfony3 with Composer

查看:52
本文介绍了使用 Composer 更新 symfony3 后 @Twig/Exception/exception_full.html.twig 中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了以下事情:

1) 我用这个命令行安装了一个新的 Symfony 3.2.2 版本:php symfony.phar new Symfony3.2.2

1) I installed a fresh Symfony 3.2.2 version with this command line : php symfony.phar new Symfony3.2.2

2) 我用这个 url 测试了版本屏幕显示:http://localhost/Symfony3.2.2/web/app_dev.php/ 并很好地显示欢迎使用Symfony 3.2.2 ...."

2) I tested the version screen display with this url : http://localhost/Symfony3.2.2/web/app_dev.php/ and it well displays "Welcome to Symfony 3.2.2 .... "

3) 然后我用这个命令更新了 symfony 和所有依赖:php ../composer.phar update symfony/symfony --with-dependencies

3) Then I did an update of symfony and all depencies with this command : php ../composer.phar update symfony/symfony --with-dependencies

4) 我没想到它会更新任何东西(因为我已经安装了最新版本)但似乎确实如此,例如更新树枝/树枝(v1.31.0 => v2.1.0)"和其他一些库(教义集合/注释/通用)

4) I did not expected it updates anything (since I have installed latest version) but it seems it does, like "Updating twig/twig (v1.31.0 => v2.1.0)" and some few others libs (doctrine collections/annotations/common)

5) 然后我重新测试 http://localhost/Symfony3.2.2/web/app_dev.php/ 但这次我收到了这个错误:

5) Then I retest http://localhost/Symfony3.2.2/web/app_dev.php/ but this times I got this error :

classes.php 第 5280 行中的 Twig_Error_Syntax:模板编译过程中抛出异常(Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, 在 C:\wamp\www\Symfony3.2.2\ 中调用var\cache\dev\classes.php 在第 5573 行并在@Twig/Exception/exception_full.html.twig"中定义").

6) 我尝试使用以下命令清除缓存:php bin/console cache:clear 然后重新测试第 5 步)但我遇到了同样的错误

6) I have tried to clear cache with command : php bin/console cache:clear and then retest step 5) but I got same error

所以欢迎所有建议......提前感谢您的帮助

So all suggestions are welcome... thanks in advance for help

推荐答案

我自己修复了...这是一个 PHP 问题...更新后,必须使用 PHP 7 代替 PHP 5(对于某些库作为Twig 我想像这里 )

I have fixed by myself... it was a PHP issue... after the update, PHP 7 must be used instead PHP 5 (for some libs as Twig I presume like mentioned here )

这篇关于使用 Composer 更新 symfony3 后 @Twig/Exception/exception_full.html.twig 中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆