Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[!!!][FEATURE] Integrate Symfony/Console into CommandController
This is a backport from the new introduced feature in Flow https://review.typo3.org/#/c/30653/ with upstream patches. This extends the base ``CommandController`` by some convenience helpers from the ``symfony/console`` package: easy output coloring through "<error>Warning!</error>" TableHelper to render values to a grid ProgressHelper to render and advance and progress bars DialogHelper with numerous types of questions like: select, ask, confirm, askHidden, etc Additionally this change improves the ``mapRequestArgumentsToControllerArguments()`` method to ask for missing required arguments instead of quitting with an exception. You can make use of the new features by calling the introduced ConsoleOutput object with its respective methods: outputTable() select() ask() askConfirmation() askHiddenResponse() askAndValidate() askHiddenResponseAndValidate() progressStart() progressSet() progressAdvance() progressFinish() This change does not alter the public API so it is not breaking in the strict sense. But it introduces a new behavior: Previously all outputs where collected in the ``Cli\Response`` and only rendered to the console at the end of a CLI request. Now all methods producing output (inluding ``output()`` and ``outputLine()``) render the result directly to the console. If you use ``$this->response`` directly or let the command method return a string, the rendering is still deferred until the end of the CLI request. Resolves: #59606 Releases: master Change-Id: I33e051f698f5cc1e204f609734280bbed69610c9 Reviewed-on: http://review.typo3.org/30743 Tested-by: Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org> Tested-by: Helmut Hummel <helmut.hummel@typo3.org> Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
- Loading branch information