Implement simple argument support for CommandController
Currently arguments can only be passed to a CommandController by specifying the argument name:
./flow3_dev flow3:package:create --package-key MyPackage
For cases like the one above it would be nice to be able to specify the argument without a name:
./flow3_dev flow3:package:create MyPackage
On the implementation side this could work as follows:
- if no argument name is specified, the argument order must match the order of the command function's arguments
- if an argument without name is specified, all non-optional arguments must be specified without a name in the correct order – mixing non-optional arguments with and without specifying the name should not be possible (to avoid confusion)
- to make things easier we can (should) make the rule that options (ie. named arguments which are optional in the function's signature) must be specified before any unnamed argument (e.g flow3:package:create --description "My Package" --make-it-extra-cool MyPackage)
[FEATURE] Shorthand command commands and arguments
This allows to type just controllername:commandname if this uniquely
identifies a package / controller /command method in the system.
Hence you can just type ./flow3 kickstart:package Foo.Bar
A second feature added is that named (required) arguments can be
specified without the argument name (like the package key Foo.Bar
above) as long as all required arguments are specified that way and
in the correct order. Optional arguments must always be named and
specified before the named arguments.
The CLI request now also provides a getExceedingArguments() method and
this fixes a small bug related to camel cased controller names.