Problem/Motivation

I had svg_image and svg_embed both installed. While performing module updates, I discovered that both of these modules have a shared dependency - enshrined/svg-sanitize, however the way the dependency is required in svg_embed makes it impossible to update svg_image module to the latest version.

drupal/svg_embed 2.1.2 requires enshrined/svg-sanitize (^0.20) -- which is >=0.20 < 0.21     
drupal/svg_image 3.2.1 requires enshrined/svg-sanitize (>=0.15 <1.0)

These version constraints do not overlap as you can see.

Steps to reproduce

Install both svg_image and svg_embed - observe that svg_image is one patch version behind.

Proposed resolution

Change the version range constrain to >=0.20 <1.0

Issue fork svg_embed-3543426

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

euk created an issue. See original summary.

jurgenhaas’s picture

Version: 2.1.2 » 2.1.x-dev

This is strange. When using a constraint ^1.2 it means the same as >=1.2 <2.0. Is that different for the zero major version? Happy to change that, though, but I'd like to understand the why as well.

Do you want to provide an MR?

euk’s picture

Yeah, here is the explanation: https://getcomposer.org/doc/articles/versions.md#caret-version-range-

For pre-1.0 versions it also acts with safety in mind and treats ^0.3 as >=0.3.0 <0.4.0 and ^0.0.3 as >=0.0.3 <0.0.4.

I can throw an MR in a few.

euk’s picture

Status: Active » Needs review

MR is in!

  • jurgenhaas committed 98de160c on 2.1.x authored by euk
    Issue #3543426 by euk, jurgenhaas: Shared dependency prevents related...
jurgenhaas’s picture

Status: Needs review » Fixed

Thank you for the MR and the link to the explanation. Now I get why I got it wrong. Tagging a patch release in a minute.

Status: Fixed » Closed (fixed)

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