composer/composer — pull request #1327 by simensen (2012-11-14 17:10:51+00:00)
Title: Added addLink and removeLink to Configuration Source Interface

* Added `addLink()` and `removeLink()` to `ConfigSourceInterface`
* Added `addLink()` and `removeLink()` implementations to `JsonConfigSource`
* Added tests (+ a ton of fixtures) for `JsonConfigSource`
* Added additional docblocks
* Minor PSR-1/PSR-2 fixes here and there

I put a lot of work into the testing. I wasn't sure it was required as it sorta felt like I was just testing `JsonManipulator`, but who knows what is going to be going on in the future? This should hopefully future proof it as far as testing is concerned, especially if the links are handled/validated by `JsonManipulator` (or whatever) on a case-by-case basis in the future?

Anyway, it is kind of nice to know that "given this is the composer.json before, that is what it will look like after," so maybe it was worth it.

If we don't need it I can take it out.

I'll work on adding commands (`require foo/project --dev --remove`, `provide foo/interface`, etc.) once this gets merged.