Problem/Motivation

I can't install CodeMirror because it requires an old version (~1.0) of composer installers.

Steps to reproduce

Running ...
composer require 'drupal/ckeditor_codemirror:^3.0@beta'

... i get the following error:

codemirror/codemirror 5.65.8 requires composer/installers ~1.0 -> found composer/installers[v1.0.0, ..., 1.x-dev] but it conflicts with your root composer.json require (^2.0).

Proposed resolution

I changed the required version in the file composer.libraries.json from
"composer/installers": "~1.0"
to
"composer/installers": "1.0 - 2"

Comments

tfranz created an issue. See original summary.

tfranz’s picture

Patch for my problem.

wells’s picture

Status: Active » Needs work

Thanks for flagging.

One minor CR for the #2 patch -- lets do 1 || 2 instead. If only because I see that pattern far more often then hyphenated ranges. And I think it's the same thing?

tfranz’s picture

Yes, you are right – but 1 || 2 was downgrading my composer/installers from v2.2.0 => v2.0.0

So i changed it to "^1.0 || ^2.0"

I hope that's right - I don't have a lot of experience with that kind of stuff ... at least it works for me ... :-)

I was afraid of using >=1.0 because i don't know if this will break something someday. Actually, I think it shouldn't be a problem in this context.

wells’s picture

Status: Needs work » Needs review

Looks right to me. I also find composer constraints confusing (:

  • wells committed 03da580e on 3.0.x authored by tfranz
    Issue #3341595 by tfranz: Requires old version of composer installers in...
wells’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.