Remove anything already handled by a dependency from project root composer.json

I’d like to clean up my project composer.json so it doesn’t redundantly list anything already brought in by something it requires.

That is, if i require Project A, and Project A requires Project B (in its composer.json), then i want the requirement of Project B to be removed from my project root composer.json.

I filed an issue with the Composer project, just to see if anyone else has my weird wants, Command to remove redundant dependencies (those already required by other requirements) from top-level composer.json:

OK, so this request is weird and seems even weirder when i wrote it out, but the idea is when developing an application composed of multiple projects it can be faster to add dependencies at the root level composer.json, but for contributing we want to be sure everything is captured by one of the component projects.

Hence it would be very handy to have a ‘simplify’ or other command that removes any requirements in composer.json which aren’t needed because other requirements in composer.json already account for them in their requirements.