Remove the "replace" section from core/composer.json

Created on 24 June 2022, over 2 years ago
Updated 14 April 2023, over 1 year ago

Problem/Motivation

As discussed with catch and mixologic in Slack here: https://drupal.slack.com/archives/C014CT1CN1M/p1655973005466799 (Long Thread Alert), the replace section in core/composer.json for each individual Core module is not used any more. It's now done in another way (https://git.drupalcode.org/project/project_composer/-/blob/7.x-1.x/proje...)

This issue exists to remove that replace section.

Steps to reproduce

Proposed resolution

Remaining tasks

After the commit of this issue we need to:
- Ask the DA to refresh the calculated composer metadata cache (https://drupal.slack.com/archives/C014CT1CN1M/p1656003962601159?thread_t...)
- Search for modules that require core modules in their composer.json. Most probably we want to file patches against those where we remove the require, and move those to the dependencies: section of their info.yml file.

Currently identified modules with a quick query by mixologic:
- https://www.drupal.org/project/bootstrap_pages β†’ (https://git.drupalcode.org/project/bootstrap_pages/-/blob/8.x-1.x/compos...)
- https://www.drupal.org/project/w3css_paragraphs β†’ (https://git.drupalcode.org/project/w3css_paragraphs/-/blob/1.0.x/modules...)

Most probably there are more of those modules.

User interface changes

API changes

Data model changes

Release notes snippet

Drupal no longer specifies core modules β†’ in the 'replace' section of composer.json. This allows contributed versions of core modules to be downloaded with the canonical namespace using Composer.

πŸ› Bug report
Status

Fixed

Version

9.4

Component
ComposerΒ  β†’

Last updated 9 days ago

No maintainer
Created by

πŸ‡³πŸ‡±Netherlands spokje

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    This change is still causing problems.

     9.5.x > composer require drupal/colorbutton
    Using version ^1.5 for drupal/colorbutton
    ./composer.json has been updated
    Running composer update drupal/colorbutton
    > Drupal\Composer\Composer::ensureComposerVersion
    Loading composer repositories with package information
    Updating dependencies
    Lock file operations: 3 installs, 0 updates, 0 removals
      - Locking drupal/ckeditor (1.0.1)
      - Locking drupal/colorbutton (1.5.0)
      - Locking drupal/panelbutton (1.5.0)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 3 installs, 0 updates, 0 removals
      - Downloading drupal/ckeditor (1.0.1)
      - Downloading drupal/panelbutton (1.5.0)
      - Downloading drupal/colorbutton (1.5.0)
      - Installing drupal/ckeditor (1.0.1): Extracting archive
      - Installing drupal/panelbutton (1.5.0): Extracting archive
      - Installing drupal/colorbutton (1.5.0): Extracting archive
    

    I'm on Drupal 9.5.x and there is no reason that I should be installing drupal/ckeditor (1.0.1) on 9.5.x. I don't want to move to the contrib module yet.

  • πŸ‡΅πŸ‡ΉPortugal gueguerreiro Lisboa

    FYI, this also happened on one of our websites after an upgrade to Drupal 9.5, which caused CKEditor 4 to break, because of an incompatibility with advagg, which expects CKEditor JS path to be the one from core: πŸ› CKeditor skin CSS 404 after "Enable preprocess on all JS" Needs review . We did not want to use the one from contrib, but there was no way to force it to use the module from Core, that I could tell.

    And the migration to CKEditor 5 is still a no-go for this particular website, because there are some installed CKEditor plugins that are still not compatible with the new version.

Production build 0.71.5 2024