Prioritise all project composer.json config values over the defaults

Migrated issue

Reported by: andrewbelcher

Related to !386 (merged) !384 (merged)

Problem/Motivation

https://github.com/ddev/ddev-drupal-contrib uses scripts/expand_composer_json.php for expanding out the module's composer.json into a project (it is specifically aiming to mirror what's done in CI).

When merging, the default comes first, meaning extra.installer-paths is ordered default then project. This means that you cannot override the location of a specific module, as the type:drupal-module definition comes first.

This would be helpful in ddev-drupal-contrib as it allows you to have a module pull in other ecosystem modules and have easy access to phpunit, linting etc.

Steps to reproduce

Add a specific module installer location (e.g. add a dependency to web/modules/custom), use expand_composer_json.php and run composer install. The module will be in web/modules/contrib.

Proposed resolution

As per the precedent set for repositories, do an explicit merge for installer paths in the opposite order.

Remaining tasks

Implement it.

User interface changes

N/A

API changes

Change in order, but restores what I think would be expected.

Data model changes

N/A

Related issue: Issue #3562253

Related issue: Issue #3564186

Edited Feb 12, 2026 by drupalbot
Assignee Loading
Time tracking Loading