phpspec/phpspec — pull request #298 by gquemener (2014-02-28 18:45:41+00:00)
Title: Late registration of commands to allow overriding them

This PR allows to override phpspec commands by adding them into the application as late as possible.
The current implementation adds them at the instanciation of the Application (because it relies on the `getDefaultCommand` which is used in the `BaseApplication` constructor) which prevents to override them through extension with this code:

``` php
class MyExtension implements ExtensionInterface
{
public function load(ServiceContainer $container)
{
$container->setShared('console.commands.run', function ($c) {
});
}
}
```