composer/installers — pull request #204 by derhasi (2014-12-14 16:21:57+00:00)
Title: Nested packages

When dealing with frameworks like Drupal, a package may be located in the subpath of another one, like Drupal module (`htdocs/sites/all/modules/`) in Drupal core (`htdocs/`). In such a case, composer would delete all "subpackages" whenever the wrapping package will be installed or updated.

Within this branch I implemented a new extra option `installer-preserve-subpaths` that could solve that problem. An example `composer.json` is located in here: https://github.com/derhasi/drupal-composer-project/blob/eb987b0bbb1463846a4561ca22fe498d20d24e6e/composer.json .

The given code backs up relevant subpaths, whenever a package would overwrite the defined paths. After the installation of the package the files and folders will be restored.

In addition not only whole packages but single files could be preserved this way.