Skip to content
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

Composer V2 doesn't add Vendor Files #3

Closed
ghost opened this issue Apr 14, 2020 · 4 comments · Fixed by #4
Closed

Composer V2 doesn't add Vendor Files #3

ghost opened this issue Apr 14, 2020 · 4 comments · Fixed by #4

Comments

@ghost
Copy link

ghost commented Apr 14, 2020

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

  • Craft version: 3.4.14
  • PHP version: 7.3.16
  • Database driver & version: MySQL v5.5
  • Plugins & versions:
@ghost
Copy link
Author

ghost commented Apr 14, 2020

I get the following errors coming back...

  • craftcms/plugin-installer 1.5.3 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match your constraint.
  • craftcms/plugin-installer 1.5.4 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match your constraint.
  • craftcms/cms 3.4.14 requires craftcms/plugin-installer ~1.5.3 -> satisfiable by craftcms/plugin-installer[1.5.4, 1.5.3].
  • Root composer.json requires craftcms/cms 3.4.14 -> satisfiable by craftcms/cms[3.4.14].

@brandonkelly brandonkelly transferred this issue from craftcms/cms Apr 15, 2020
@brandonkelly
Copy link
Member

brandonkelly commented Apr 15, 2020

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
Copy link
Member

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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant