I tried creating a new composer.json file today and installing the latest version of the library. I did this by running composer require invoiceninja/sdk-php like the page https://packagist.org/packages/invoiceninja/sdk-php says to. After doing this, my composer.json file looked like this:
{
"require": {
"invoiceninja/sdk-php": "^1.1"
}
}
I also had a composer.lock file (contents omitted here because it's much larger).
When I tried to use composer to install packages using the composer.json and composer.lock files on a system using PHP 8.0, I get the following error:
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- symfony/deprecation-contracts is locked to version v3.2.1 and an update of this package was not requested.
- symfony/deprecation-contracts v3.2.1 requires php >=8.1 -> your php version (8.0.27) does not satisfy that requirement.
Problem 2
- symfony/deprecation-contracts v3.2.1 requires php >=8.1 -> your php version (8.0.27) does not satisfy that requirement.
- guzzlehttp/guzzle 7.5.0 requires symfony/deprecation-contracts ^2.2 || ^3.0 -> satisfiable by symfony/deprecation-contracts[v3.2.1].
- guzzlehttp/guzzle is locked to version 7.5.0 and an update of this package was not requested.
So I think a transitive dependency is pushing the PHP requirement up to 8.1. I'm pretty new to the PHP ecosystem so I'm not sure what the norms are here, if you should update the minimum PHP version for the library itself to 8.1, or if the library user is expected to investigate transitive dependencies themselves. Because I was unsure, I thought I'd mention it here in case you find this report useful.
I tried creating a new
composer.json
file today and installing the latest version of the library. I did this by runningcomposer require invoiceninja/sdk-php
like the page https://packagist.org/packages/invoiceninja/sdk-php says to. After doing this, mycomposer.json
file looked like this:I also had a
composer.lock
file (contents omitted here because it's much larger).When I tried to use composer to install packages using the
composer.json
andcomposer.lock
files on a system using PHP 8.0, I get the following error:This is despite the page https://packagist.org/packages/invoiceninja/sdk-php currently showing:
So I think a transitive dependency is pushing the PHP requirement up to 8.1. I'm pretty new to the PHP ecosystem so I'm not sure what the norms are here, if you should update the minimum PHP version for the library itself to 8.1, or if the library user is expected to investigate transitive dependencies themselves. Because I was unsure, I thought I'd mention it here in case you find this report useful.
Thanks!