Bug #59324

CLI command drops last line of method description

Added by Mathias Brodala over 5 years ago. Updated 12 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extbase
Target version:
Start date:
2014-06-04
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

Description

The CLI command drops the last line of method descriptions. Thus given the following doc comment:

/**
 * My method
 *
 * My longer description for this method:
 * it can span multiple lines.
 *
 * @param string $argument
 * @return void
 */

The description ends up like this:

My method

My longer description for this method:

The actual wanted description is this:

My longer description for this method:

it can span multiple lines.

The issue seems to be an error while porting the Mvc\Cli\Command::getDescription method from TYPO3 Flow. While TYPO3 Flow uses array_shift to drop the first line of the description (as stated with ... except for the first line ...), Extbase uses array_pop which obviously removes the last line instead.

The fix is replacing array_pop with array_shift.

The bug can be seen in action easily by executing ./typo3/cli_dispatch.phpsh help help.

Associated revisions

Revision 40219c6d (diff)
Added by Mathias Brodala over 5 years ago

[BUGFIX] Fix command description

Due to using array_pop instead of array_shift the last line
of the command description is dropped instead of the first.

Use array_shift instead to get the full description
annotated for the command method.

Resolves: #59324
Releases: 6.2, 6.1, 4.7
Change-Id: I4d7c320b0ef334adbd15997d15d8e7a56d5739c1
Reviewed-on: https://review.typo3.org/30612
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring

Revision ce838380 (diff)
Added by Mathias Brodala over 5 years ago

[BUGFIX] Fix command description

Due to using array_pop instead of array_shift the last line
of the command description is dropped instead of the first.

Use array_shift instead to get the full description
annotated for the command method.

Resolves: #59324
Releases: 6.2, 6.1, 4.7
Change-Id: I4d7c320b0ef334adbd15997d15d8e7a56d5739c1
Reviewed-on: https://review.typo3.org/30613
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel

History

#1 Updated by Markus Klein over 5 years ago

  • Project changed from Extbase MVC Framework to TYPO3 Core
  • Category deleted (Extbase: Command)

#2 Updated by Markus Klein over 5 years ago

  • Category set to Extbase
  • Status changed from New to Accepted
  • Is Regression set to No
  • TYPO3 Version set to 6.2

#3 Updated by Mathias Brodala over 5 years ago

Am I understanding correctly that project "Extbase MVC Framework" only was used when Extbase was still a separate repository?

#4 Updated by Gerrit Code Review over 5 years ago

  • Status changed from Accepted 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/30612

#5 Updated by Gerrit Code Review over 5 years ago

Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30613

#6 Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30613

#7 Updated by Mathias Brodala over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#8 Updated by Benni Mack 12 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF