From: Wouter Wolters Date: Thu, 31 Mar 2016 20:49:52 +0000 (+0200) Subject: [TASK] Add available commands to console output X-Git-Tag: TYPO3_8-5-0~33 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/1c2f24e10eda07943daa31d3c1ad0634f4bbf6e8?ds=sidebyside [TASK] Add available commands to console output When no valid key or command is given only the cliKeys are written on the CLI. Now the available commands are written as well. Resolves: #75350 Releases: master Change-Id: If8102649128cf663831022b7b75a5150daa91649 Reviewed-on: https://review.typo3.org/47475 Reviewed-by: Susanne Moog Tested-by: Susanne Moog Tested-by: TYPO3com Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn --- diff --git a/typo3/sysext/core/Classes/Console/CommandRequestHandler.php b/typo3/sysext/core/Classes/Console/CommandRequestHandler.php index 5ae7a6c0b3c2..fecfa9865aa6 100644 --- a/typo3/sysext/core/Classes/Console/CommandRequestHandler.php +++ b/typo3/sysext/core/Classes/Console/CommandRequestHandler.php @@ -80,6 +80,19 @@ class CommandRequestHandler implements RequestHandlerInterface // Make sure output is not buffered, so command-line output and interaction can take place $this->bootstrap->endOutputBufferingAndCleanPreviousOutput(); + + if (!$command) { + $cliKeys = array_keys($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys']); + + $output->writeln('Old entrypoint keys available:'); + asort($cliKeys); + foreach ($cliKeys as $key => $value) { + $output->writeln(' ' . $value); + } + $output->writeln(''); + $output->writeln('TYPO3 Console Commands:'); + } + $exitCode = $this->application->run($input, $output); exit($exitCode); } @@ -105,7 +118,7 @@ class CommandRequestHandler implements RequestHandlerInterface } /** - * This request handler can handle any CLI request, but checks for + * This request handler can handle any CLI request * * @param InputInterface $input * @return bool Always TRUE @@ -113,7 +126,7 @@ class CommandRequestHandler implements RequestHandlerInterface public function canHandleRequest(InputInterface $input) { $this->populateAvailableCommands(); - return $this->getCommandToRun($input) !== false; + return true; } /**