composer/composer — pull request #1013 by 1stvamp (2012-08-19 21:58:07+00:00)
Title: Add "extends" property to JSON format allowing for config file inheritance

Recently we've had the requirement to have multiple JSON files per deployment environment, e.g. `testing.json` and `production.json` configs for our CI and production environments that define different `repositories` to the development `composer.json` in order to use SSH aliases to get around the one-deploy-key-per-repo limitation for Github private repos.

Currently I'm using a shell script that is ran during CI and production deploys to generate a copy of the `composer.json` with hostnames replaced, in order to avoid duplicating lots of JSON properties.

The Python build tool buildout defines an `extends` property that allows you to inherit properties from another config file, e.g. have a main config file and then just override the properties you need to in your environment files.

I've added an `extends` property like this to the Composer JSON format that recursively adds parent properties during `JsonFile::read()`.
Unittest too, 'natch.