我无法找出如何处理此错误...这里是完整的消息:
MacBook-Pro ~ % brew unlink php@7.4 && brew link --force --overwrite php@5.6
Unlinking /usr/local/Cellar/php@7.4/7.4.16... 0 symlinks removed.
Warning: Already linked: /usr/local/Cellar/php@5.6/5.6.40
To relink:
brew unlink php@5.6 && brew link --force php@5.6
MacBook-Pro ~ % brew unlink php@5.6 && brew link --force php@5.6
Unlinking /usr/local/Cellar/php@5.6/5.6.40... 25 symlinks removed.
Warning: Calling `sha256 "digest" => :tag` in a bottle block is deprecated! Use `brew style --fix` on the formula to update the style or use `sha256 tag: "digest"` instead.
Please report this …Run Code Online (Sandbox Code Playgroud) 我现在正在进行新的 Symfony 5 安装测试,我正在阅读文档的这一部分:
https://symfony.com/doc/5.4/page_creation.html#rendering-a-template
我跑了composer require twig,它说正在安装它,然后当作曲家运行“Unpacking Symfony packs”时,它会说“正在删除 symfony/twig-pack (v1.0.1)”...
后来我注意到在我的 VCS 中,composer.json 和composer.lock 没有任何变化,因此该命令至少没有更改任何非 gitignored 文件。我注意到twig/twig被指定为整个composer.lock中的包的依赖项,所以也许它只是使用其中之一......?我现在有点困惑。
所以我的问题是:如果它已经在composer.lock中,为什么还要安装它,为什么又删除它?我读取的输出错误吗?
我认为一些输出来自 Symfony 的composer.json“脚本”部分,它是通过运行预先编写的:
composer create-project symfony/skeleton:"^5.4" my_project_directory
cd my_project_directory
composer require webapp
Run Code Online (Sandbox Code Playgroud)
从该页面:https ://symfony.com/doc/5.4/setup.html#creating-symfony-applications
相关预先存在的自动生成的composer.json规范:
"symfony/framework-bundle": "5.4.*",
"symfony/twig-bundle": "5.4.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
Run Code Online (Sandbox Code Playgroud)
这是我的作曲家输出...抱歉,这篇文章很长,无论如何应该很容易找出相关点:
symfony-5 % composer require twig
Using version ^1.0 for symfony/twig-pack
./composer.json has been updated
Running composer update symfony/twig-pack
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating …Run Code Online (Sandbox Code Playgroud)