Closed geerlingguy closed 4 years ago
Composer treats minors below 1.0
as majors, so you need to explicitly upgrade your version constraints to allow for version 0.7.x
of this plugin.
Version 0.7.0
was released last June and is fully ready for Composer 2.0, while also still supporting Composer 1.0.
https://github.com/Dealerdirect/phpcodesniffer-composer-installer/releases/tag/v0.7.0
So: composer require --dev dealerdirect/phpcodesniffer-composer-installer:"^0.7.0"
and your problem should be fixed.
Ah... you're quite correct. I'm trying to sift through a number of new Composer v2-related build issues across many projects I maintain that popped up over the weekend, and I didn't notice that my version of this plugin was actually behind.
I required the latest version and now it seems everything is working with v2 correctly. Thanks for the quick help!
I changed the version manually in the global composer.json file, and removed hirak/prestissimo
to unblock myself here. thanks @geerlingguy for digging in and @jrfnl for the fix!
Your requirements could not be resolved to an installable set of packages.
Problem 1
- dealerdirect/phpcodesniffer-composer-installer v0.6.2 requires php ^5.3|^7 -> your PHP version (8.0.0) does not satisfy that requirement.
- dealerdirect/phpcodesniffer-composer-installer v0.6.1 requires php ^5.3|^7 -> your PHP version (8.0.0) does not satisfy that requirement.
- dealerdirect/phpcodesniffer-composer-installer v0.6.0 requires php ^5.3|^7 -> your PHP version (8.0.0) does not satisfy that requirement.
- dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires php ^5.3|^7 -> your PHP version (8.0.0) does not satisfy that requirement.
How is this invalid?
This suddenly broke a CI for me. 🤷♀️
@lilithebowman Your issue is a different one from the one described above.
All the same, the solution is the same: update the allowed version of this plugin to ^0.7.0
.
Background:
Any version of the plugin prior to 0.7.0
only allowed installation on PHP 5.x and 7.x. Version 0.6.2
(the last version before 0.7.0
) was released in January this year, well before it was clear what would change in PHP 8, so there was no way it could be guaranteed that the plugin would work on PHP 8.x.
Once the first alpha release for PHP 8.0 came out, the plugin was tested on PHP 8.0 and the PHP version constraints widened to allow installation on PHP 8.0. This change was included in the 0.7.0
release.
And as Composer treats minors below 1.0
as majors, you need to explicitly update your version constraints to allow for version 0.7.x
of this plugin.
I've created a new issue based on @lilithebowman's comment to address this issue if/when it occurs for other users.
Problem/Motivation
When I try using my projects that have this plugin with Composer v2, I get the following errors:
Expected behaviour
This plugin should work with Composer 2.
Actual behaviour
See error message above.
Steps to reproduce
Upgrade to Composer 2 (
composer self-update --2
).Proposed changes
N/A
Environment
Output of
vendor/bin/phpcs --config-show
:Tested against
master
branch?master
branch.