-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ecosystem Upgrade: Composer Plugin Readiness for 2.0 #8726
Comments
@Seldaek Suggestion: make this a "pinned" issue ;-) |
Published an UPGRADE guide now which might help. I think it covers most relevant changes, but we did change more than that for sure in internal classes. |
drupal/core-composer-scaffold and drupal/core-vendor-hardening only need Composer 1 for testing. We can't go up to Composer here until we also bump composer/semver in Drupal core. These plugins work with Composer 2, though, so this should not be an issue. drupal-composer/drupal-scaffold is deprecated; everyone should switch to drupal/core-composer-scaffold. Note that it is possible to use drupal/core-composer-scaffold from Drupal ^8.9 to install really old versions of Drupal 8, back to Drupal 8.1.0 should work, although technically only 8.7.0+ is supported. I've got one more plugin from that list that I can update to Composer 2 shortly. |
Hi, I think
In particular, people are assuming that Thanks, [2020-09-28] I've updated my breakdown to include the new events in v2. |
Closing here as Composer 2.0 is out, not that the migration work is over but it probably never will be :) |
# Why composer version 1 is required Currently there is errors about plugin version ``` Problem 1 - composer/installers is locked to version v1.8.0 and an update of this package was not requested. - composer/installers v1.8.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint. Problem 2 - cweagans/composer-patches is locked to version 1.6.7 and an update of this package was not requested. - cweagans/composer-patches 1.6.7 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint. Problem 3 - drupal-composer/drupal-scaffold is locked to version 2.3.0 and an update of this package was not requested. - drupal-composer/drupal-scaffold 2.3.0 requires composer-plugin-api ^1.0.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint. Problem 4 - oomphinc/composer-installers-extender is locked to version v1.1.2 and an update of this package was not requested. - oomphinc/composer-installers-extender v1.1.2 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint. Problem 5 - simplesamlphp/composer-module-installer is locked to version v1.1.6 and an update of this package was not requested. - simplesamlphp/composer-module-installer v1.1.6 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint. Problem 6 - wikimedia/composer-merge-plugin is locked to version v1.4.1 and an update of this package was not requested. - wikimedia/composer-merge-plugin v1.4.1 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint. Problem 7 - composer/installers v1.8.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint. - jquery/inputmask 5.0.3 requires composer/installers ~1.0 -> satisfiable by composer/installers[v1.8.0]. - jquery/inputmask is locked to version 5.0.3 and an update of this package was not requested. ``` This link: composer/composer#8726 explains that composer 2 does not support plugins made for composer 1. # Why php8 is not supported Some dependencies don't seem to support it. I didn't save the error log from composer.
Update September: See the list of plugins still lacking support below if you want to help
As we are getting Composer 2.0 closer and closer to a stable release,
and would like to get more people involved with testing it, it is
quite important to get the most common plugins to support our 2.0
branch. Otherwise many users will not be able to try the latest
Composer snapshots when we switch them to 2.0.
If you maintain a Composer plugin and would like to help, here is how:
Get a composer 2.0 build by running
composer self-update --snapshot
Set up a trial project requiring your plugin from a local path repo
so you can easily work on it and iterate, e.g.
Change your plugin's composer.json to require
"composer-plugin-api": "^1.0 || ^2.0"
(to begin with, adjust to ^2.0 only if you can't make this work)Update your main plugin entry point class to implement the new
PluginInterface methods, see e.g.
composer/installers@d2a9832#diff-e236c450b11f27e4bb81a5069bc619bc
Check out the UPGRADE guide for any other changes which might be relevant to you.
Run
php composer.phar update
in that trial project to play withyour plugin using Composer 2, and fix any issues you run into. If you require other plugins which are not compatible yet, you can bypass that using
--ignore-platform-reqs
as it will ignore the invalid composer-plugin-api requirements.If at all possible, releasing a version which supports both
composer-plugin-api ^1.0 and ^2.0 is the best option really as that
will allow people to use whichever composer version within a project,
and makes the transition smoother. I am sure the more involved plugins
will not be able to do this but I think for most it should be
possible.
Finally, report issues to us at
https://github.com/composer/composer/issues if anything is broken or
unclear, we'll try to help out ASAP.
Thanks for your attention and help getting the Composer v2 ecosystem up to speed!
The text was updated successfully, but these errors were encountered: