craftcms / plugin-installer

Composer installer for Craft CMS plugins.
MIT License
28 stars 3 forks source link

Composer V2 doesn't add Vendor Files #3

Closed ghost closed 4 years ago

ghost commented 4 years ago

Description

I am trying to install, via Composer, all the Vendor and Plugin files onto a new server. The server company will only allow a Composer V2 install, which, Craft CMS doesn't seem to account for. Are you going to update this anytime soon? Or how can I get around this issue?

Steps to reproduce

  1. Download Composer v2
  2. Delete Vendor files
  3. Run Composer Install/Update and it stops at craftcms/plugin-installer v1.5.3 stating it needs Composer V1 not V2.

Additional info

ghost commented 4 years ago

I get the following errors coming back...

brandonkelly commented 4 years ago

Composer 2 support has been drafted at PR #4. Going to wait until Composer 2 is officially released before merging/releasing though, in case something changes before then.

Installing Craft will also require yiisoft/yii2-composer to support Composer 2 as well, so that’s another holdup.

In the meantime if you really need Composer 2 support, you can add these to your composer.json:

{
  "minimum-stability": "dev",
  "require": {
    "yiisoft/yii2-composer": "dev-composer-2 as 2.0.8",
    "...": "..."
  },
  "repositories": [
    {"type": "vcs", "url": "https://github.com/brandonkelly/yii2-composer"}
  ]
}
brandonkelly commented 4 years ago

We’ve released craftcms/plugin-installer 1.5.5 with Composer 2 support, so you can safely remove the custom craftcms/plugin-installer: dev-composer2 requirement if you already added that.

Still waiting on yiisoft/yii2-composer though.

brandonkelly commented 4 years ago

yiisoft/yii2-composer 2.0.9 was released today, so that settles the Composer 2 compatibility issues. 🎉

It’s now safe to remove custom Composer requirements for those packages in composer.json, as well as that brandonkelly/yii2-composer custom repository.