结论:删除 guzzlehttp/guzzle 6.2.0
Conclusion: remove guzzlehttp/guzzle 6.2.0
在 composer require irazasyed/telegram-bot-sdk ^2.0
成功后,现在我正在尝试使用 composer require erlangb/betfair
包含另一个包,但这是我从作曲家那里得到的:
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
requires ~5.0
, guzzlehttp/command
0.7.0
also requires ~5.0
which in turn is required by guzzlehttp/guzzle-services
0.5.0
。不幸的是,erlangb/betfair
的 dev-master
分支仍在使用旧的 Guzzle 版本,所以这不好。我建议你要么找到一个替代的 betfair 包,要么自己 fork 并更新它。
在 composer require irazasyed/telegram-bot-sdk ^2.0
成功后,现在我正在尝试使用 composer require erlangb/betfair
包含另一个包,但这是我从作曲家那里得到的:
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
requires ~5.0
, guzzlehttp/command
0.7.0
also requires ~5.0
which in turn is required by guzzlehttp/guzzle-services
0.5.0
。不幸的是,erlangb/betfair
的 dev-master
分支仍在使用旧的 Guzzle 版本,所以这不好。我建议你要么找到一个替代的 betfair 包,要么自己 fork 并更新它。