Task #50382

TYPO3 Flow Base Distribution - Task #51183: CLI improvements

Impossible to use arguments in CLI that are added by overriding initializeCommandMethodArguments()

Added by Karsten Dambekalns about 6 years ago. Updated about 6 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Command
Target version:
-
Start date:
2013-07-24
Due date:
% Done:

0%

Sprint:
PHP Version:
Has patch:
No
Complexity:

Description

Having something like

    /**
     * @return void
     * @throws \TYPO3\Flow\Mvc\Exception\InvalidArgumentTypeException
     */
    protected function initializeCommandMethodArguments() {
        parent::initializeCommandMethodArguments();
        $this->arguments->addNewArgument('porcelain', 'boolean', FALSE, FALSE);
    }

should provide the porcelain option to all command methods. But since the CLI request never returns true for hasArgument(), since parseRawCommandLineArguments() uses the ReflectionService and thus will never consider the --porcelain flag if given on the command line.

History

#1 Updated by Bastian Waidelich about 6 years ago

  • Parent task set to #51183

Also available in: Atom PDF