Remove definition of drupal repository in composer.libraries.json

Created on 12 September 2024, 8 months ago
Updated 19 September 2024, 8 months ago

Problem/Motivation

The composer update command on our project started failing after installing layout_paragraphs.

Our composer update process parses all the modules composer.libraries.json files to automatically install libraries and other dependencies.

We got those kinds of error we didn't have before:

- Root composer.json requires drupal/audio_embed_field dev-master#235ad4a0b0052c04cbf7e0b1c17e901809d2a167, it is satisfiable by drupal/audio_embed_field[dev-master] from composer repo (https://our-inhouse-repo/drupal/modules/raw/master) but drupal/audio_embed_field[dev-1.x, dev-2.x, 1.0.0, 1.x-dev (alias of dev-1.x), 2.0.0, 2.x-dev (alias of dev-2.x), 10.0.1] from composer repo (https://packages.drupal.org/8) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.

Proposed resolution

It looks like the problem comes from the composer.libraries.json, that allows automatic installation of the dragula library, but sadly also redefines the drupal repository.

Removing the following lines from the composer.libraries.json file fixes our problem:

    "drupal": {
      "type": "composer",
      "url": "https://packages.drupal.org/8"
    },

If we had defined some package exclusions for example in our main composer.json file, this new declaration of the Drupal repository would override them.

Remaining tasks

Validate MR.

🐛 Bug report
Status

Needs review

Version

2.1

Component

Code

Created by

🇫🇷France mably

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024