Review main Abandoned

86247[TASK] Enable complete json output of `bin/typo3 list` CLI command

Garvin Hicking CR 0 V 0 Hard +272 −0 updated 09/21/24, 18:46

Commit message

The TYPO3 CLI command `bin/typo3 list` is able to emit all registered
commands through the TYPO3 specific commandRegistry.

This output was only available for the 'text' output directive,
not for the directives 'json', 'xml' and 'md'.

Before, Symfony was only able to inspect Symfony command
that were registered through the failsafe/degraded method.
That means, several additional TYPO3 Symfony Commands like
'backend:user:create' were never listed.

The Symfony Console Descriptor API does not easily allow to plug the
commandRegistry as a data source. Also, the API gates several
important methods to being `private`, so implementing a different
output format results in code redundancy.

Because of this, for now only the output format 'json' has
been implemented as a custom JsonDescriptor, which is
able to connect to the commandRegistry to yield all existing
commands.

The full command list can be utilized for example by the
TYPO3 Documentation Team for automatic generation of
all available commands, their arguments and descriptions.

The "txt" format is not sufficient to allow extraction of
all needed data.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 3

Review log 46

  1. Garvin Hicking uploaded patch set 1 09/20/24, 14:49

  2. core-ci voted on patch set 1 V -1 09/20/24, 14:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66341

  3. Garvin Hicking uploaded patch set 2 V -1 09/20/24, 15:02

    Remove matcher from test
  4. core-ci voted on patch set 2 V +1 09/20/24, 15:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66342

  5. Garvin Hicking commented on patch set 2 09/20/24, 19:55

    Unresolved

    Huh. I need to realign myself. I found out that when implementing my "own" list command, which unlike the TYPO3 "ListCommand" override doesn't utilize its own registry, it's pretty easy to use the built-in Symfony way of dumping json output. See https://github.com/garvinhicking/clinspector_gadget for an implementation on this. Unsure on how to proceed. Zzzz.
  6. Garvin Hicking abandoned the change 09/21/24, 18:46

    I'm abandoning this. Makes more sense as a custom extension.