Bug #28306
Optional command line argument is ignored
Status: | Resolved | Start date: | 2011-07-19 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | MVC | |||
Target version: | TYPO3 Flow Base Distribution - 1.0 beta 1 | |||
PHP Version: | Complexity: | |||
Has patch: | Affected Flow version: |
Description
Consider the following command as part of a command controller:
public function importCommand($packageKey = NULL) { var_dump($packageKey); }
Call the command with
./flow3 foo:import MyPackage.Key
Expected result is MyPackage.Key, but actual result is NULL
Associated revisions
[!!!][TASK] Some improvements to CLI handling
- Fixes optional argument handling
- Improves readability of help index
- Help for single commands (usage: "./flow3 help <command>")
- Adds convenience methods output(), outputLine() and quit() to
CommandController as wrapper for response object
- Adjust existing commands to the new syntax
This is a breaking change because $this->response->appendContent() will no longer append
a line break. Use $this->outputLine() instead.
Change-Id: Ieb10c861b5671536ead54a2e3b74aa96584f0abd
Related: #28231
Resolves: #28306
History
#1 Updated by Bastian Waidelich about 4 years ago
- Status changed from New to Accepted
- Assigned To set to Bastian Waidelich
#2 Updated by Robert Lemke about 4 years ago
Another symptom of this bug is the kickstart:action controller command:
The second argument "controller name" is optional and its default is "Standard". Currently it is not possible to kickstart any other than a Standard controller, no matter what name is passed as the second argument.
#3 Updated by Robert Lemke almost 4 years ago
- Subject changed from Optional command line augment is ignored to Optional command line argument is ignored
#4 Updated by Karsten Dambekalns almost 4 years ago
Just tested the kickstart:actioncontroller
example and that worked fine... Seems fixed already.
#5 Updated by Robert Lemke almost 4 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
yes, that has been resolved