97428[FEATURE] Add interactive mode to lowlevel:inspect
Commit message
Test this change
Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch
- Check out patch set 2
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/28/97428/2 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/28/97428/2 && git cherry-pick FETCH_HEAD
Review
-
Code review CR 0 Needs a vote
-
Verified V 0 Needs a vote
- core-ci +1 CI
Issues 1
Files 17
- typo3/sysext/core/Documentation/Changelog/15.0/Feature-111375-BrowseConfigurationModuleDataInTheTerminal.rstnew+54 −0
- typo3/sysext/lowlevel/Classes/Command/InspectCommand.php+131 −4
- typo3/sysext/lowlevel/Classes/Inspector/Tui/BrowserMode.phpnew+29 −0
- typo3/sysext/lowlevel/Classes/Inspector/Tui/BrowserState.phpnew+566 −0
- typo3/sysext/lowlevel/Classes/Inspector/Tui/BrowserView.phpnew+404 −0
- typo3/sysext/lowlevel/Classes/Inspector/Tui/Key.phpnew+40 −0
- typo3/sysext/lowlevel/Classes/Inspector/Tui/KeyReader.phpnew+150 −0
- typo3/sysext/lowlevel/Classes/Inspector/Tui/Screen.phpnew+113 −0
- typo3/sysext/lowlevel/Classes/Inspector/StyledText.php+3 −0
- typo3/sysext/lowlevel/Classes/Inspector/TreeRenderer.php+40 −19
- typo3/sysext/lowlevel/Documentation/CommandLine/Index.rst+15 −0
- typo3/sysext/lowlevel/Tests/Functional/Command/CliCommandTest.php+2 −0
- typo3/sysext/lowlevel/Tests/Functional/Command/InspectCommandTest.php+5 −0
- typo3/sysext/lowlevel/Tests/Unit/Inspector/Tui/BrowserStateTest.phpnew+278 −0
- typo3/sysext/lowlevel/Tests/Unit/Inspector/Tui/BrowserViewTest.phpnew+173 −0
- typo3/sysext/lowlevel/Tests/Unit/Inspector/Tui/KeyReaderTest.phpnew+76 −0
- typo3/sysext/lowlevel/Tests/Unit/Inspector/TreeRendererTest.php+11 −0
Review log 79
-
Matthias Vogel uploaded patch set 1 11/09/26, 11:22
-
core-ci voted on patch set 1 V +1 11/09/26, 11:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113656
-
Matthias Vogel marked it ready for review 11/20/26, 08:56
-
Garvin Hicking commented on patch set 1 V +1 11/20/26, 12:38
Love this. I think we should go the extra mile here and make `BrowserView` a more generic concept. Maybe other CLI commands could use that in the future. So I'd remove the texts that are specific to the configuration providers, and let it be able to browse any kind of tree. For example we could use that for the "backend routes" CLI to introspect as well. It's a lot of code to digest and maintain, but I'd take it for the helpfulness it gives me on CLI. (I assume you checked out https://github.com/symfony/tui and it probably doesn't feel safe enough yet to require/bundle, right?) -
Matthias Vogel uploaded patch set 2
V +111/21/26, 12:08Rebase onto main and switch to --flat and --json from 97427 -
core-ci voted on patch set 2 V +1 11/21/26, 12:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115112
-
Matthias Vogel marked it work in progress 11/21/26, 12:24
-
Matthias Vogel commented on patch set 1 11/21/26, 12:26
Reply
Thanks Garvin! I'm on it, and I'll go a bit further: the browser becomes generic and moves to EXT:core, so commands outside of EXT:lowlevel can use it too (that also picks up Josua's idea from 97427). Planned as a stacked series: 1. [TASK] Move the value rendering of lowlevel:inspect (DataNormalizer, LabelResolver, ValueFormatter, TreeRenderer, StyledText, ...) to EXT:core, without behaviour change 2. This change: a generic browser in EXT:core that knows nothing about providers. A command hands it a tree and gets the selected path back. lowlevel:inspect -i becomes its first user. 3. --interactive for debug:backend:routes 4. --interactive for debug:backend:modules 5. --interactive for site:show Patch set 2 is only the rebase onto the merged 97427 (--flat/--json instead of --format). While rebasing I noticed that the TUI doesn't use your new escaping of bidi characters yet. That gets fixed in the rework as well. symfony/tui: back then I had only looked at php-tui, so thanks for the pointer. I checked it now: it came with Symfony 8.1 and is still marked experimental (no BC promise, 8.2 is already in beta), it would add revolt/event-loop as a new dependency, and it has no tree or drill-down widget, so state, search and the tree preview would stay our own code anyway. It would only replace Screen and KeyReader. Once it is stable, swapping those two should be small, because they are separate from the rest. -
Garvin Hicking commented on patch set 2 11/21/26, 18:43
Reply Unresolved
Sounds good. I'm not too sure that this belongs into EXT:core. I think it better fits with EXT:lowlevel, so it could be more isolated from the core. We should discuss this in the core/feature-unit. Maybe even EXT:core could ship an interface and "stub" so that every CLI extension can work when using this interface, but the functionality actually only comes with EXT:lowlevel. So that no extension directly "needs" this and could work without interactive modes (instead of maybe crashing or needing "if extension(lowlevel) installed" checks. As for symfony/ui - if we can use adapters/facades for the parts that symfony/tui would be suitable, we can better switch that out at some point. Maybe you can factor that in. Keep me posted, I really like this, thanks for the effort 😊