gpt4 book ai didi

php - 结论 : remove guzzlehttp/guzzle 6. 2.0

转载 作者:搜寻专家 更新时间:2023-10-31 21:25:56 25 4
gpt4 key购买 nike

composer require irazasyed/telegram-bot-sdk ^2.0 运行正常之后,现在我正在尝试使用 composer require erlangb/betfair 包含另一个包,但这是我从 Composer 那里得到的:

Using version ^0.2.0 for erlangb/betfair
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- erlangb/betfair 0.2.0 requires guzzlehttp/guzzle-services 0.5.* -> satisfi
able by guzzlehttp/guzzle-services[0.5.0].
- Conclusion: remove guzzlehttp/guzzle 6.2.0
- guzzlehttp/guzzle-services 0.5.0 requires guzzlehttp/command 0.7.* -> sati
sfiable by guzzlehttp/command[0.7.0, 0.7.1].
- Conclusion: don't install guzzlehttp/command 0.7.1
- Installation request for erlangb/betfair ^0.2.0 -> satisfiable by erlangb/
betfair[0.2.0].
- Conclusion: don't install guzzlehttp/guzzle 6.2.0
- guzzlehttp/command 0.7.0 requires guzzlehttp/guzzle ~5.0 -> satisfiable by
guzzlehttp/guzzle[5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.1.0, 5.2.0, 5.3.0].
- Can only install one of: guzzlehttp/guzzle[5.0.0, 6.2.0].
- Can only install one of: guzzlehttp/guzzle[5.0.1, 6.2.0].
- Can only install one of: guzzlehttp/guzzle[5.0.2, 6.2.0].
- Can only install one of: guzzlehttp/guzzle[5.0.3, 6.2.0].
- Can only install one of: guzzlehttp/guzzle[5.1.0, 6.2.0].
- Can only install one of: guzzlehttp/guzzle[5.2.0, 6.2.0].
- Can only install one of: guzzlehttp/guzzle[5.3.0, 6.2.0].
- Installation request for guzzlehttp/guzzle == 6.2.0.0 -> satisfiable by gu
zzlehttp/guzzle[6.2.0].

Installation failed, reverting ./composer.json to its original content.

我能做什么?

最佳答案

简而言之

在 composer 中,您不能拥有同一包的两个版本,因为由于 PHP 中命名空间的性质,这会导致自动加载冲突。

错误

telegram-bot-sdk 包需要版本 ~6.0,正如您在它的 composer.json 中看到的那样

"require": {
...
"guzzlehttp/guzzle": "~6.0",
...
},

但是erlangb/betfair 0.2.0需要 ~5.0guzzlehttp/command 0.7.0还需要 ~5.0,这又是 guzzlehttp/guzzle-services 0.5.0 所需要的.不幸的是,erlangb/betfairdev-master 分支仍在使用旧的 Guzzle 版本,所以这不好。我建议您要么找到一个替代的 betfair 包,要么自己 fork 并更新它。

关于php - 结论 : remove guzzlehttp/guzzle 6. 2.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36166321/

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