davidbarratt/custom-installer — pull request #1 by derhasi (2014-12-15 14:10:53+00:00)
Title: Preserve subpaths

In the case of a Drupal installation we might have multiple projects (modules, themes, sites) inside the big drupal core. For the initial installation the current custom-installer might work fine, but in the case of an update (e.g. core update from 7.33 to 7.34) nested packages would be overwritten and therefore deleted.

The code will back up any defined subpaths, before a package overrides that one. This will work for real packages, as well as for custom files within a Drupal installation (e.g. settings.php, files).

A working example for Drupal 7 is located in [my drupal-composer-project fork](https://github.com/derhasi/drupal-composer-project/blob/08b19d179ba06af25756039ca552c21a4e450e53/composer.json).

For reference: I tried some other approaches:

1. Pull request for composer/installers: https://github.com/derhasi/installers/tree/nested-packages (which lead to https://github.com/composer/installers/pull/204) => out of scope for that project
2. A separate plugin building on top of composer/installers: https://github.com/derhasi/composer-nested-installer => not flexible enough, as composer/installers only provides a subset of package types and `drupal-core` isn't one of that

So I think your custom-installer might be a good point to start with this approach. Do you see any downsides?