I have a package that I have installed through composer that required guzzlehttp >=6.0
. With that requirement, composer chose to install 6.2.1.
I am now trying to require a dependency that explicitly requires 6.1.1.
I get the following error:
Problem 1
- Can only install one of: guzzlehttp/guzzle[6.1.1, 6.2.1].
- Can only install one of: guzzlehttp/guzzle[6.2.1, 6.1.1].
- Can only install one of: guzzlehttp/guzzle[6.1.1, 6.2.1].
- chargely/chargify-sdk-php v0.1.1 requires guzzlehttp/guzzle 6.1.1 -> satisfiable by guzzlehttp/guzzle[6.1.1].
- Installation request for chargely/chargify-sdk-php ^0.1.1 -> satisfiable by chargely/chargify-sdk-php[v0.1.1].
- Installation request for guzzlehttp/guzzle (locked at 6.2.1) -> satisfiable by guzzlehttp/guzzle[6.2.1].
Also, composer why
confirms that the only that version of guzzle is there is because of my >=6.0
requirement.
In theory, that initial requirement should be OK with using a downgraded version of guzzle. How do I get composer to do that?
If you have 2 packages with concurrency requirements, you can go around with aliasing.
In your composer.json
, just add:
"require": {
"guzzlehttp/guzzle": "6.2 as 6.1"
}
Then add new package with composer require ...
.
Go check more detailed answer for more.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With