gpt4 book ai didi

php - Composer 无法安装 Twig Extensions

转载 作者:行者123 更新时间:2023-12-04 00:58:48 24 4
gpt4 key购买 nike

我尝试在我的 Symfony 5 应用程序的 dev-master 版本中安装 twig/extensions 包。我遇到以下输出:

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for twig/extensions dev-master -> satisfiable by twig/extensions[dev-master].
- Conclusion: remove twig/twig v3.0.3
- Conclusion: don't install twig/twig v3.0.3
- twig/extensions dev-master requires twig/twig ^2.10 -> satisfiable by twig/twig[v2.10.0, v2.11.0, v2.11.1, v2.11.2, v2.11.3, v2.12.0, v2.12.1, v2.12.2, v2.12.3, v2.12.4, v2.12.5].
- Can only install one of: twig/twig[v2.10.0, v3.0.3].
- Can only install one of: twig/twig[v2.11.0, v3.0.3].
- Can only install one of: twig/twig[v2.11.1, v3.0.3].
- Can only install one of: twig/twig[v2.11.2, v3.0.3].
- Can only install one of: twig/twig[v2.11.3, v3.0.3].
- Can only install one of: twig/twig[v2.12.0, v3.0.3].
- Can only install one of: twig/twig[v2.12.1, v3.0.3].
- Can only install one of: twig/twig[v2.12.2, v3.0.3].
- Can only install one of: twig/twig[v2.12.3, v3.0.3].
- Can only install one of: twig/twig[v2.12.4, v3.0.3].
- Can only install one of: twig/twig[v2.12.5, v3.0.3].
- Installation request for twig/twig (locked at v3.0.3) -> satisfiable by twig/twig[v3.0.3].

作为package page似乎在其版本 ^2.10 中需要 twig/twig 我试图找到它在我的项目中有一个需要冲突的包(例如 ^3.0) 但似乎不存在:

$ composer why twig/twig
knplabs/knp-paginator-bundle v5.1.1 requires twig/twig (^2.0 || ^3.0)
symfony/twig-bridge v5.0.4 requires twig/twig (^2.10|^3.0)
symfony/twig-bundle v5.0.4 requires twig/twig (^2.10|^3.0)
symfony/twig-pack v1.0.0 requires twig/twig (^2.12|^3.0)
symfony/web-profiler-bundle v5.0.4 requires twig/twig (^2.10|^3.0)
twig/extra-bundle v3.0.3 requires twig/twig (^2.4|^3.0)

有人能告诉我为什么 Composer 不能解决我的要求吗?不要犹豫,要求输出更多评论。我会相应地对此进行编辑。

这里是我的 composer.jsonrequirerequire-dev 键:

"require": {
"php": "^7.2.5",
"ext-ctype": "*",
"ext-iconv": "*",
"antishov/doctrine-extensions-bundle": "^1.4",
"knplabs/knp-paginator-bundle": "^5.1",
"sensio/framework-extra-bundle": "^5.1",
"symfony/asset": "5.0.*",
"symfony/console": "5.0.*",
"symfony/dotenv": "5.0.*",
"symfony/expression-language": "5.0.*",
"symfony/flex": "^1.3.1",
"symfony/form": "5.0.*",
"symfony/framework-bundle": "5.0.*",
"symfony/http-client": "5.0.*",
"symfony/intl": "5.0.*",
"symfony/mailer": "5.0.*",
"symfony/monolog-bundle": "^3.1",
"symfony/notifier": "5.0.*",
"symfony/orm-pack": "*",
"symfony/process": "5.0.*",
"symfony/security-bundle": "5.0.*",
"symfony/serializer-pack": "*",
"symfony/string": "5.0.*",
"symfony/translation": "5.0.*",
"symfony/twig-pack": "*",
"symfony/validator": "5.0.*",
"symfony/web-link": "5.0.*",
"symfony/webpack-encore-bundle": "^1.7",
"symfony/yaml": "5.0.*"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.3",
"fzaninotto/faker": "^1.9",
"symfony/debug-pack": "*",
"symfony/maker-bundle": "^1.0",
"symfony/profiler-pack": "*",
"symfony/test-pack": "*"
}

最佳答案

看起来你的 twig 扩展包几乎已经被遗弃了!

来自包装师:

要求: Twig / Twig :^1.27|^2.0

在 dev-master 分支上:

要求: Twig / Twig :^2.10

对不起 friend ! https://packagist.org/packages/twig/extensions#dev-master

关于php - Composer 无法安装 Twig Extensions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60340979/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com