symfony/symfony — pull request #3857 by francodacosta (2012-04-10 11:42:27+00:00)
Title: [Console] default command

For stand alone applications passing a command is mandatory but most of the times not really necessary

So instead of calling my application like this ```/myapp.php mycommand --my_option``` I can just write ```./myapp.php --my_option```

this PR allows for it while allowing to add (and execute) more than one command

You just need to add ```$app->setDefaultCommandName('command:name');``` and if the command is not found the default one will be executed

includes unit tests and does not breack BC

it is the same as https://github.com/symfony/Console/pull/2, but I did the pull request on the wrong repository