Allow deprecation-contracts 3#2961
Conversation
|
@derrabus @GrahamCampbell v3.0 of deprecation-contracts requires a minimum version of PHP8.0 so causes issues for people still on PHP7 |
|
It won’t, because we did not drop v2. |
|
Installing causes a composer version error as it installs 3.0.0 by default with a PHP version of >=8.0.2 so it requires --ignore-platform-reqs to avoid the error. |
|
This is only because you generated your lock file using PHP 8 or did not include the proper platform config in your app's composer.json file to force it to fetch PHP 7.4 compatible dependencies. |
I would highly, highly recommend not doing that, as the code you install will fail at runtime, and not actually work. |
What would be the proper platform config in composer.json to force fetch PHP 7.4 compatible dependencies? |
|
You could set (though I don't recommend): {
"config": {
"platform": {
"php": "7.4"
}
}
}You lose flexibility and can have weird stuff happen when explicitly setting the platform here, because you're basically forcing composer to ignore the actual version of PHP you're using. Instead, just make sure that you're using the correct version of PHP CLI. For example, I ran into this and in my case, my server was running PHP 7.4, but my command line was using PHP 8.1. So, when doing an install of guzzle, I was getting a version of |
No description provided.