Feature #27563

Implement simple argument support for CommandController

Added by Robert Lemke about 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
MVC
Start date:
2011-06-20
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

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)

Related issues

Related to TYPO3.Flow - Bug #27820: CLI arguments are not working for camelCased commandsResolvedRobert Lemke2011-07-03

Actions
#1

Updated by Mr. Hudson about 10 years ago

  • Status changed from New to Under Review

Patch set 1 of change I89ab55f99c0ea35a66167b485b62238034e10bc7 has been pushed to the review server.
It is available at http://review.typo3.org/3124

#2

Updated by Robert Lemke about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF