Skip to content

Ecosystem Upgrade: Composer Plugin Readiness for 2.0 #8726

@Seldaek

Description

@Seldaek

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.

    "repositories": [
        {"type":"path", "url": "../../my-plugin"}
    ],
  • 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 with
    your 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!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions