cakephp/cakephp — pull request #3383 by markstory (2014-04-24 02:08:06+00:00)
Title: 3.0 - Strict subcommands

This set of changes implements stricter subcommand handling. After these changes, subcommands work in the following way:

* If a shell has no subcommands in its option parser, and it is the top level shell, all public methods can be called. This lets us keep a nice RAD way to build simple shells that don't need additional parsing features.
* For Shells that define subcommands, only those subcommands will be callable.
* Tasks must be exposed via subcommands. Any subcommands on tasks must also be exposed by nested parsers.

One nice benefit of these changes is that subcommands and tasks can be nested as deeply as it is required.

This set of changes also renames Task::execute() to be main(). This makes one convention fewer that people need to remember, and makes shells and tasks more interchangeable.