Issue Bug Closed

#59843Fix the help message of CLI

Stefano Kowalke 06/24/14, 12:53 updated 10/19/17, 21:00

Description

The CLI offers a help which prints the informations of a command

./cli_dispatch.phpsh extbase extensionapi:fetch help
Fetch an extension from TER.

COMMAND:
  core_a_p_i:extensionapi:fetch

USAGE:
  /Volumes/HDD/Users/sok/Sites/TYPO3/www.coreapi.dev/http/./typo3cms ./typo3cms extensionapi:fetch [<options>] <key>

ARGUMENTS:
  --key                The extension key

OPTIONS:
  --version            The exact version of the extension, otherwise the latest
                       will be picked
  --location           Where to put the extension. System = typo3/sysext,
                       Global = typo3/ext, Local = typo3conf/ext
  --overwrite          $overwrite Overwrite the extension if already exists
  --mirror             $mirror    Mirror to fetch the extension from. Run
                       extensionapi:listmirrors to get the list of all
                       available repositories, otherwise a random mirror will
                       be selected

The text will be extracted by Reflection from the doc header of the method.

/**
 * Fetch an extension from TER.
 *
 * @param string $key       The extension key
 * @param string $version   The exact version of the extension, otherwise the latest will be picked
 * @param string $location  Where to put the extension. System = typo3/sysext, Global = typo3/ext, Local = typo3conf/ext
 * @param bool   $overwrite Overwrite the extension if already exists
 * @param int    $mirror    Mirror to fetch the extension from. Run extensionapi:listmirrors to get the list of all available repositories, otherwise a random mirror will be selected
 *
 * @return void
 */

As you can see the help text includes sometimes the name of the variable ($override, $mirror). This happens when there are more than one whitespaces between the datatype and the variable, which is needed to align the header comment.

Reviews 2