- Issue created by @mably
- Merge request !181Issue #3473953 by @mably: Remove definition of drupal repository in composer.libraries.json → (Open) created by mably
- Status changed to Needs review
8 months ago 9:47pm 19 September 2024
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.
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.
Validate MR.
Needs review
2.1
Code