使用: symfony新my_project_nasdame --version=lts
或
composer create-project /网站-骨架my_project_name
或
symfony新test_project332
php7.4
到处都是错误
lexcodfh@artek:~/tmp [130] $ ~/.symfony/bin/symfony new test_new_project
* Creating a new Symfony project with Composer
[KO]
Script cache:clear returned with error code 255
!!
!! Fatal error: Declaration of Symfony\Component\DependencyInjection\ServiceLocator::has(string $id) must be compatible with Psr\Container\ContainerInterface::has($id) in /home/l/lexcodfh/tmp/test_new_project/vendor/symfony/dependency-injection/ServiceLocator.php on line 46
!! Symfony\Component\ErrorHandler\Error\FatalError {#89
!! -error: array:4 [
!! "type" => 64
!! "message" => "Declaration of Symfony\Component\DependencyInjection\ServiceLocator::has(string $id) must be compatible with Psr\Container\ContainerInterface::has($id)"
!! "file" => "/home/l/lexcodfh/tmp/test_new_project/vendor/symfony/dependency-injection/ServiceLocator.php"
!! "line" => 46
!! ]
!! #message: "Compile Error: Declaration of Symfony\Component\DependencyInjection\ServiceLocator::has(string $id) must be compatible with Psr\Container\ContainerInterface::has($id)"
!! #code: 0
!! #file: "./vendor/symfony/dependency-injection/ServiceLocator.php"
!! #line: 46
!! }
!!
Script @auto-scripts was called via post-update-cmd
unable to run /home/l/lexcodfh/.local/bin/composer create-project symfony/skeleton /home/l/lexcodfh/tmp/test_new_project --no-interaction: exit status 255
lexcodfh@artek:~/tmp [1] $不适用于主机的解决方案:https://github.com/symfony/symfony/issues/40393
需要帮助
发布于 2021-04-22 22:27:19
对基于Debian的发行版使用apt remove php7.4-psr php-psr命令。
https://stackoverflow.com/questions/67172779
复制相似问题