symfony4 - 无法使用“symfony/website-skeleton”创建 symfony 4 项目
问题描述
使用 --full 创建项目时出现错误消息
Symfony CLI 版本 v4.21.3 (2020-12-11T09:19:56+0000 - 稳定)
PHP 7.1.9 (cli) (build: Aug 30 2017 18:34:46) (ZTS MSVC14 (Visual C++ 2015) x64) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998 -2017 Zend科技
Composer 版本 2.0.8 2020-12-03 17:20:38
并使用命令
symfony new blog --full
错误信息
Script cache:clear returned with error code 255
!!
!! // Clearing the cache for the dev environment with debug true
!!
!! 07:21:01 CRITICAL [php] Uncaught Error: Call to undefined method Twig\Environment::registerUndefinedTokenParserCallback() ["exception" => Error { …}]
!!
!! In srcApp_KernelDevDebugContainer.php line 1546:
!!
!! Attempted to call an undefined method named "registerUndefinedTokenParserCallback" of class "Twig\Environment".
!! Did you mean to call e.g. "registerUndefinedFilterCallback" or "registerUndefinedFunctionCallback"?
!!
!!
!! cache:clear [--no-warmup] [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>
!!
!!
Script @auto-scripts was called via post-update-cmd
解决方案
twig/extra-bundle
根据我的错误报告,这是v3.2.0 中的错误。损坏的版本未发布,并且可以使用 PHP 7.1 再次启动项目
推荐阅读
- sql - SQL Server - 使用行的许多字段作为列名创建视图
- python - 在列表上调用 Counter 函数时出错
- python - 删除整数列表周围的括号
- tfs - 安装 TFS 2018
- python - 如何从上下文菜单和文件名中打开 CMD 作为 Sublime Text 3 上的 cmd 输出?
- reflection - 如何使用 ID3D12ShaderReflection::GetVariableByName 方法
- typescript - 使用角度和打字稿导航到上一个页面等待数据
- angular - 在相同类型的两个不同类对象上使用角度插值就像它们是同一个对象
- java - Android Studio 更新问题 - 连接失败
- scala - 我可以对列执行哪些操作