92733[TASK] Provide shell autocomplete to impexp:export
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Simon Schaufelberger +1
-
Verified V +2 Done
- Stefan Bürk +2
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 1
Review log 1114
-
Georg Ringer uploaded patch set 1 02/06/26, 21:05
-
core-ci voted on patch set 1 V -1 02/06/26, 21:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95346
-
Georg Ringer rebased onto patch set 2
V -108/06/26, 20:42 -
Georg Ringer commented on patch set 2 08/06/26, 20:50
This change is ready for review. -
Tobias Gaertner voted on patch set 1 CR +1 V +1 08/06/26, 20:50
-
Tobias Gaertner voted on patch set 2 CR +1 V +1 08/06/26, 20:51
-
core-ci voted on patch set 2 V +1 08/06/26, 20:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106054
-
Georg Ringer commented on patch set 3
CR +1V +108/14/26, 06:53Published edit on patch set 2. -
core-ci voted on patch set 3 V +1 08/14/26, 07:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106692
-
Stefan Bürk voted on patch set 3 CR +1 V +1 08/14/26, 13:07
-
Simon Schaufelberger voted on patch set 3 CR +1 V +1 08/14/26, 13:32
-
Stefan Bürk voted on patch set 3 CR +2 V +2 08/14/26, 13:39
-
Stefan Bürk merged patch set 4 08/14/26, 13:50
-
Stefan Bürk commented on patch set 4 08/15/26, 18:07
Unresolved
Post-merge note, and an apology first: I +2'd this and did not spot the points below before it went in. Nothing here warrants a revert - the mechanism is sound and notably cheaper than the existing redirects precedent, because _complete is not in TYPO3's CommandRegistry, so CommandApplication::wantsFullBoot() already forces a full boot with a cache-backed TcaSchemaFactory::load(); the closures only read the materialised SchemaCollection, with no queries and no extra TCA parsing. On an unconfigured system all() returns an empty collection rather than throwing, so completion degrades to _ALL without a fatal. But three things should be picked up in a follow-up, ideally one small [TASK] on main and 14.3. 1. --dependency was part of #107248 ("ExportCommand: table, include-related, include-static, dependency") but is not covered; the issue auto-resolved on merge, so the gap is now invisible in the tracker. Suggest reopening #107248 or filing a follow-up. Extension keys are completable from the PackageManager the same way 95135 completes --distribution. 2. GeneralUtility::makeInstance(TcaSchemaFactory::class) in the three closures should be constructor injection. The closures are bound to $this, ExportCommand already has a DI constructor, and TcaSchemaFactory is already a dependency inside EXT:impexp (ImportExport::injectTcaSchemaFactory()). Every sibling in the series (95135, 95143, 95147) and the existing CheckIntegrityCommand/CleanupRedirectsCommand use injected properties - 92733 is the only outlier. That would also collapse the three duplicated closure bodies into one shared private method. 3. Patch set 1 added * :shell:`impexp:export` to the "commands already provide completion" list in Feature-106839-IntroduceShellAuto-completionForTheTypo3Script.rst; the ps3 inline edit removed it and nothing replaced it. Amending that list after the 14.0 release is established practice (b82f5993a17 for redirects, ae0f1b9c08a for styleguide, merged the day before this change), so code and docs are currently out of sync on both main and 14.3. Two smaller ones while touching the file: pages is suggested for --table although Export::addRecordsForPid() skips it unconditionally (Export.php:404), so that suggestion can never do anything - it is legitimate for --include-related/--include-static though, so the filter has to be per-option. And --type is the most obviously enumerable option in the command: $this->export->getSupportedFileTypes() already returns exactly the right list including the gzcompress() guard, with no new dependency needed. Finally, core has no test for command completion anywhere yet - CommandCompletionTester is unused across all of typo3/sysext/*/Tests. ExportCommandTest already builds the command by hand with CommandTester, so adding one completion assertion there would be a few lines and would set the pattern for 95135/95143/95147.