Installing with PHP 8
grandeljay opened this issue · 2 comments
Hey,
I looked at #943 but had no success with using --ignore-platform-req=php
and ^3.0@dev
, both didn't work for me.
Log
$ composer require knplabs/github-api:^3.0 guzzlehttp/guzzle:^7.0.1 http-interop/http-factory-guzzle:^1.0
./composer.json has been updated
Running composer update knplabs/github-api guzzlehttp/guzzle http-interop/http-factory-guzzle
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires knplabs/github-api 3.0 -> satisfiable by knplabs/github-api[v3.0.0].
- knplabs/github-api v3.0.0 requires psr/cache ^1.0 -> found psr/cache[1.0.0, 1.0.1] but the package is fixed to 2.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Problem 2
- Root composer.json requires guzzlehttp/guzzle 7.0.1 -> satisfiable by guzzlehttp/guzzle[7.0.1].
- guzzlehttp/guzzle 7.0.1 requires guzzlehttp/psr7 ^1.6.1 -> found guzzlehttp/psr7[1.6.1, ..., 1.8.3] but the package is fixed to 2.1.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Problem 3
- Root composer.json requires http-interop/http-factory-guzzle 1.0 -> satisfiable by http-interop/http-factory-guzzle[1.0.0].
- http-interop/http-factory-guzzle 1.0.0 requires guzzlehttp/psr7 ^1.4.2 -> found guzzlehttp/psr7[1.4.2, ..., 1.8.3] but the package is fixed to 2.1.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
What am I doing wrong?
--with-all-dependencies
--ignore-platform-req=php
Seems to have worked. A bunch of stuff was downgraded.
Log
$ composer require knplabs/github-api:^3.0 guzzlehttp/guzzle:^7.0.1 http-interop/http-factory-guzzle:^1.0 --with-all-dependencies --ignore-platform-req=php
./composer.json has been updated
Running composer update knplabs/github-api guzzlehttp/guzzle http-interop/http-factory-guzzle --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 4 updates, 0 removals
- Downgrading guzzlehttp/guzzle (7.4.1 => 7.0.1)
- Downgrading knplabs/github-api (v3.4.0 => v3.0.0)
- Downgrading psr/cache (2.0.0 => 1.0.1)
- Upgrading symfony/deprecation-contracts (v2.5.0 => v3.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 4 updates, 0 removals
- Downloading guzzlehttp/guzzle (7.0.1)
- Downloading psr/cache (1.0.1)
- Downloading knplabs/github-api (v3.0.0)
- Downgrading guzzlehttp/guzzle (7.4.1 => 7.0.1): Extracting archive
- Downgrading psr/cache (2.0.0 => 1.0.1): Extracting archive
- Upgrading symfony/deprecation-contracts (v2.5.0 => v3.0.0): Extracting archive
- Downgrading knplabs/github-api (v3.4.0 => v3.0.0): Extracting archive
Generating autoload files
9 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
This seems like an issues with locked dependencies (like stated in the first comment output). I've also released a new version with support for psr/cache
3.0.
What you can try to do is composer require knplabs/github-api:^3.0 guzzlehttp/guzzle:^7.0.1 http-interop/http-factory-guzzle:^1.0 --no-update
and afterwards run composer update knplabs/github-api guzzlehttp/guzzle http-interop/http-factory-guzzle -W
. This will install the new libraries and update (if needed) dependencies that are required by these libraries.
If there is still an issue, you could check with composer why-not knplabs/github-api 3.5.0
to see why a dependency is not installed.