Document alternative installation to wikimedia/composer-merge-plugin

Created on 4 July 2025, 7 days ago

Problem/Motivation

As previously mentioned in issue #3155213 wikimedia/composer-merge-plugin is deprecated and projects using it will see a warning in their composer project:

[warning] Available, but library probably installed with the
wikimedia/composer-merge-plugin. You should switch to use default
installation. Please see the README for more information.

The Drupal recommended way of installing third-party libraries is with Asset Packagist, as documented here on the Drupal installation page:

https://www.drupal.org/docs/develop/using-composer/manage-dependencies#t...

We should offer an alternative Asset Packagist way to install the two required libraries for the 3.0.x and 3.1.x branch:

  • /libraries/codemirror
  • /libraries/ckeditor5-source-editing-codemirror

Example installation steps

Many Drupal distributions are adopting Asset Packagist as a vehicle to download, install, and manage third-party Javascript and CSS packages into Drupal's libraries folder. Here are the required steps to setup Asset Packagist with your project.

  1. Add the Composer Installers Extender PHP package by oomphinc to composer.json.

    composer require oomphinc/composer-installers-extender

  2. Add Asset Packagist to the "repositories" section of your project's root composer.json.
    "repositories": [
        {
            "type": "composer",
            "url": "https://asset-packagist.org"
        }
    ]
  3. Ensure that npm-asset and bower-asset are registered as new "installer-types" and "installer-paths" to be installed into Drupal's /libraries folder in composer.json.
    "extra": {
        "installer-types": [
            "npm-asset",
            "bower-asset"
        ],
        "installer-paths": {
            "web/libraries/{$name}": [
                "type:drupal-library",
                "type:npm-asset",
                "type:bower-asset"
            ]
        }
    }
  4. Set the installation path for npm-asset/cdubz--ckeditor5-source-editing-codemirror under "installer-paths" in composer.json.
    "extra": {
        "installer-types": [
            "npm-asset",
            "bower-asset"
        ],
        "installer-paths": {
            "web/libraries/ckeditor5-source-editing-codemirror": [
                "npm-asset/cdubz--ckeditor5-source-editing-codemirror"
                ],
            "web/libraries/{$name}": [
                "type:drupal-library",
                "type:npm-asset",
                "type:bower-asset"
            ]
        }
    }
  5. Require the two libraries with the following commands:
    composer require npm-asset/cdubz--ckeditor5-source-editing-codemirror
    composer require bower-asset/codemirror
📌 Task
Status

Active

Version

3.1

Component

Documentation

Created by

🇨🇦Canada chrisck BC, Canada

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

Comments & Activities

Production build 0.71.5 2024