Project

General

Profile

Actions

Task #61630

closed

Output dashed name for missing command arguments on CLI

Added by Mathias Brodala over 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
Extbase
Target version:
Start date:
2014-09-16
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

If a command controller argument like "sayHelloTo" is not passed on CLI execution, an error message like this is shown:

Required argument "sayHelloTo" is not set.

Enter "./typo3/cli_dispatch.phpsh extbase help" for an overview of all available commands
or "./typo3/cli_dispatch.phpsh extbase help <command identifier>" for a detailed description of the corresponding command.

Even though the help command clarifies everything, it would be useful, if the error message did output --say-hello-to instead of sayHelloTo. This way one does not even have to look up the help.


Files

command-argument-dashed.patch (1.42 KB) command-argument-dashed.patch Show dashed command argument name Mathias Brodala, 2014-09-16 11:41
Actions #1

Updated by Gerrit Code Review over 9 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34425

Actions #2

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34425

Actions #3

Updated by Helmut Hummel over 9 years ago

  • Status changed from Under Review to Rejected

Thanks for the report and your efforts.
However it unfortunately does not fit in the planned changes of command controllers which will be integrated for 7LTS

You not always need to specify the dashed name at all. most of the time you can just pass arguments without names.
Besides that, I like to include the change from Flow which uses Symfony console, where instead of an exception to be thrown, the user can directly enter the required argument.
(all this is already implemented in typo3_console which will end up in the core in some release but not 7.0 any more)

Actions #4

Updated by Helmut Hummel over 9 years ago

To explain a bit more I take your example:

$ ./typo3/cli_dispatch.phpsh extbase message:greet
Required argument "sayHelloTo" is not set
$

Then you can provide the missing argument just like that to make it work:

$ ./typo3/cli_dispatch.phpsh extbase message:greet Helmut
Hello Helmut
$
Actions #5

Updated by Mathias Brodala over 9 years ago

I get what you mean. ;-) See my comment on the review server.

Actions #6

Updated by Gerrit Code Review over 9 years ago

  • Status changed from Rejected to Under Review

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34425

Actions #7

Updated by Gerrit Code Review over 9 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34449

Actions #8

Updated by Mathias Brodala over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 50 to 100
Actions #9

Updated by Gerrit Code Review over 9 years ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34449

Actions #10

Updated by Gerrit Code Review over 9 years ago

Patch set 3 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34449

Actions #11

Updated by Mathias Brodala over 9 years ago

  • Status changed from Under Review to Resolved
Actions #12

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF