Task #61630
closed
Output dashed name for missing command arguments on CLI
Added by Mathias Brodala about 10 years ago.
Updated about 6 years ago.
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
- 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
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
- 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)
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
$
I get what you mean. ;-) See my comment on the review server.
- 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
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
- Status changed from Under Review to Resolved
- % Done changed from 50 to 100
- 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
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
- Status changed from Under Review to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF