synapsestudios/synapse-base — pull request #85 by bjyoungblood (2014-06-13 16:49:50+00:00)
Title: Refactor console commands

## Refactor console commands

Currently, in order to register console commands, they need to be entirely instantiated and have all their dependencies injected, and this happens any time a single command is used. This is a lot of unnecessary overhead when commands are executed (whether by the console or during the course of a request).

As discussed, they should be refactored so that each `Command` is a proxy for a dependent class representing its unit of work. This proxy will also register itself with `Symfony\Console`.

### Acceptance Criteria
1. None

### Tasks
- A `CommandProxy` class which extends `Synapse\Command\CommandProxy` is created for every `Command` class
- All `Command` classes that have a constructor have it updated to remove the command name
- All `Command` classes change to implement `Synapse\Command\CommandInterface`
- All `Command` classes change their `execute` method to `public`
- All `Command` classes have their `configure` method moved to their new corresponding `CommandProxy` class
- All factories for `Command` classes have a new corresponding factory for the `CommandProxy`
- The command name is moved to the `CommandProxy`'s constructor
- `CommandProxy::setFactory` is called with `$app->raw()` where `` is the key of the command to be run
- All calls to `$app->command` are changed to use the `CommandProxy`'s factory

### Additional Notes
- None