Reputation: 63
After a composer require irazasyed/telegram-bot-sdk ^2.0
went ok, now I'm trying to include another package with composer require erlangb/betfair
but this is what i get from 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.
What i could do?
Upvotes: 4
Views: 10196
Reputation: 4833
In composer you can't have two versions of the same package, since it would cause autoload collisions due to the nature of namespaces in PHP.
The telegram-bot-sdk
package requires version ~6.0
, as you can see in it's composer.json
"require": {
...
"guzzlehttp/guzzle": "~6.0",
...
},
but 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
. Unfortunately, the dev-master
branch of erlangb/betfair
is still using the old Guzzle version, so this is no good. I suggest you either find an alternative betfair package or fork and update it yourself.
Upvotes: 1