Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
692 views
in Technique[技术] by (71.8m points)

symfony4 - can't create a symfony 4 project with "symfony/website-skeleton"

I have an error message when I create the project with --full

Symfony CLI version v4.21.3 (2020-12-11T09:19:56+0000 - stable)

PHP 7.1.9 (cli) (built: 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 Technologies

Composer version 2.0.8 2020-12-03 17:20:38

And command using

symfony new blog --full

error message

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 TwigEnvironment::registerUndefinedTokenParserCallback() ["exception" => Error { …}]
!!
!!  In srcApp_KernelDevDebugContainer.php line 1546:
!!
!!    Attempted to call an undefined method named "registerUndefinedTokenParserCallback" of class "TwigEnvironment".
!!    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

screenshot of error


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This was a bug in twig/extra-bundle v3.2.0, according to my bug report. The broken version was unpublished, and starting a project is possible again using PHP 7.1


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...