doctrine/doctrine2 — pull request #1081 by kander (2014-07-15 11:07:55+00:00)
Title: Add "additional commands" to the Console Runner

Currently, using Migrations in a Doctrine projects requires you to roll your own CLI. We already have a cli-config.php which is called when running /vendor/bin/doctrine.php - however, that only allows us to inject a HelperSet. It does not offer a mechanism to inject additional commands into the CLI application.

If this patch is accepted, I'll submit a suggestion for Migrations' documentation to call:

ConsoleRunner::addAdditionalCommand(new \Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand);
ConsoleRunner::addAdditionalCommand(new \Doctrine\DBAL\Migrations\Tools\Console\Command\ExecuteCommand);
... etc

I'm not 100% whether line 73 should be in ConsoleRunner::addCommands() or ConsoleRunner::run() - I've placed it in run() for now.