Bug #59843
closedFix the help message of CLI
100%
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.
Updated by Gerrit Code Review over 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31106
Updated by Helmut Hummel over 10 years ago
- Status changed from Under Review to Needs Feedback
Stefano Kowalke wrote:
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.
As far as I know, such aligning of variables is against our CGLs. So Question is whether we want to support that by the help command
Updated by Stefano Kowalke over 10 years ago
I can't find any passage where the CGL is against aligning. Its just not mentioned. After a discussion with Sebastian Kurfürst years ago. We implemented the support of aligning in the PHPCS Sniffs. IMO that is exactly what the CGL says - its in the hand of the developer.
Personally I tend to the aligned version because the code becomes more readable.
Updated by Stefan Neufeind over 10 years ago
I feel we agreed upon not aligning but indenting with only one space (at least in CGL for the core).
But for outputting the help-text I agree that exploiding with taking into account multiple whitespaces (and that might include tabs as well etc.) is a good idea though.
Updated by Gerrit Code Review over 10 years ago
- Status changed from Needs Feedback to Under Review
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31106
Updated by Gerrit Code Review over 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31106
Updated by Helmut Hummel over 10 years ago
Stefano Kowalke wrote:
I can't find any passage where the CGL is against aligning. Its just not mentioned.
http://docs.typo3.org/typo3cms/CodingGuidelinesReference/PhpFileFormatting/UsingPhpdoc/Index.html
"The single parts of information for a phpDoc keyword are separated by one single space."
This sentence is pretty clear to me.
The question is: should we nevertheless change the help text parser to be a bit more relaxed to support other coding styles.
I tend to not do it, but wouldn't strongly object such a change. It is a low risk and pretty straightforward change...
Updated by Gerrit Code Review over 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31106
Updated by Gerrit Code Review over 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31106
Updated by Gerrit Code Review over 10 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31857
Updated by Stefano Kowalke over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 036741fdc0379a8a72378165f92bd9b99c24ef64.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed