Recipe Composer plugin: support wikimedia/composer-merge-plugin

Created on 21 May 2025, 5 months ago

Problem/Motivation

If you are using wikimedia/composer-merge-plugin on a project, then the new Recipe unpack Composer plugin โ†’ will not work because in RootComposer.php

In RootComposer.php line 142:

  [AssertionError (1)]
  Composer root package and composer.json match
  private static function checkRootPackage(string $composer_content, RootPackageInterface $root_package): bool {
    $composer = JsonFile::parseJson($composer_content);
    return empty(array_diff_key($root_package->getRequires(), $composer['require'] ?? [])) && empty(array_diff_key($root_package->getDevRequires(), $composer['require-dev'] ?? []));
  }

In $composer the result of the merge from wikimedia/composer-merge-plugin are present.

Steps to reproduce

- Use wikimedia/composer-merge-plugin
- Have some composer.json with require and/or required-dev merged.

Proposed resolution

- Remove this check?
- Execute the unpack plugin before Composer merge plugin?

Remaining tasks

Determine solution.

Release notes snippet

โœจ Feature request
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component

recipe system

Created by

๐Ÿ‡ซ๐Ÿ‡ทFrance Grimreaper France ๐Ÿ‡ซ๐Ÿ‡ท

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