Review main Merged

87923[TASK] Utilize Schema API in EXT:workspaces

Benni Mack CR +2 V +2 Hard +306 −244 updated 01/31/25, 13:26

Commit message

In the future, TYPO3 should rely on the Schema API
instead of $GLOBALS[TCA] for DB configuration. For this
reason, most code needs to be adapted, which is done
in this patch with EXT:workspaces.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Christian Kuhn +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Benni Mack +2
    • Christian Kuhn +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 1

Files 15

Review log 2332

Show 47 earlier messages
  1. Benni Mack uploaded patch set 1 01/29/25, 07:36

  2. core-ci voted on patch set 1 V -1 01/29/25, 07:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73126

  3. Benni Mack uploaded patch set 2 V -1 01/29/25, 07:51

  4. core-ci voted on patch set 2 V -1 01/29/25, 08:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73127

  5. Benni Mack uploaded patch set 3 V -1 01/29/25, 08:08

  6. core-ci voted on patch set 3 V -1 01/29/25, 08:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73128

  7. Benni Mack uploaded patch set 4 V -1 01/29/25, 08:20

  1. core-ci voted on patch set 4 V +1 01/29/25, 08:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73129

  2. Benni Mack updated the commit message in patch set 5 V +1 01/29/25, 11:03

  3. core-ci voted on patch set 5 V +1 01/29/25, 11:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73135

  4. Andreas Kienast commented on patch set 5 CR -1 01/29/25, 12:41

    RemoteServer.php:97

    Can we declare `\stdClass $parameter` here?

    RemoteServer.php:125

    Can we declare `\stdClass $parameter` here?

    RemoteServer.php:232

    We use something similar in line 213. Can we extract the granularity declaration outside this huge if/else block? Alternatively, assign a variable here and do the `this->diffUtility->diff()` call only once.

    StageChangeNotification.php:79

    Why is it now necessary to check whether a schema exists for a table? If it's for the sake of being safe, I suggest to check this at the very beginning of the method.

    HistoryService.php:123

    `!$fieldInformation->isType(TableColumnType::PASSTHROUGH)`

    WorkspaceService.php:265

    Isn't this argument obsolete with the presence of `$schema` (`$schema->getName()`)?

    WorkspaceService.php:266

    same here

    WorkspaceService.php:274

    same here

    WorkspaceService.php:291

    `$schema->getCapability(TcaSchemaCapability::RestrictionRootLevel)...`
  5. Benni Mack uploaded patch set 6 CR -1 V +1 01/29/25, 14:42

  6. core-ci voted on patch set 6 V +1 01/29/25, 14:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73142

  7. Benni Mack commented on patch set 6 01/29/25, 15:38

    RemoteServer.php:97 Reply

    Done

    RemoteServer.php:125 Reply

    Done

    RemoteServer.php:232 Reply

    Done

    StageChangeNotification.php:79 Reply

    Done

    HistoryService.php:123 Reply

    Done

    WorkspaceService.php:265 Reply

    Done

    WorkspaceService.php:266 Reply

    Done

    WorkspaceService.php:274 Reply

    Done

    WorkspaceService.php:291 Reply

    Done
  8. Andreas Kienast voted on patch set 6 CR +1 01/29/25, 15:59

  9. Christian Kuhn commented on patch set 6 01/29/25, 17:15

    hmmm. *maybe* it would be great to push a series of pre-patches to make more services stateless. this shouldn't be *that* to hard since ext:workspaces in essentially fully `@internal` and should not be *that* time consuming, eithre. this would rule out a source of issues in this area. what do you think? i think we could come up with some pre-patches quite quickly.

    RemoteServer.php:76

    note HistoryService is indirectly stateful since its dependency RecordHistory *is* stateful. I think this was the reason we went with makeInstance() instead of injection for now.

    ElementEntityProcessor.php:37

    note to self: these properties should die, especially DH must never be re-used.

    BackendUtilityHook.php:37

    needs test. i'd expect this class needs to be set public.

    PreviewUriBuilder.php:53

    looks as if we should inject cache.runtime and park both previewlinklifetime and pageCache in there after first use.

    IntegrityService.php:31

    another service we should rather make stateless to then get it injected and to not have public then: it looks as if both $issues as well as $affectedElements should be hand around instead between service and consumer, and $statusRepresentation should be constant.
  10. Christian Kuhn commented on patch set 6 01/29/25, 19:01

  11. Christian Kuhn commented on patch set 6 01/29/25, 21:29

    BackendUtilityHook.php:37 Reply

    scratch that: this is an event listeners, and core configures those as public.
  12. Christian Kuhn commented on patch set 6 01/29/25, 21:46

  13. Christian Kuhn commented on patch set 6 01/30/25, 02:18

  14. Christian Kuhn uploaded patch set 7 CR +1 V +1 01/30/25, 19:40

  15. Christian Kuhn commented on patch set 6 01/30/25, 19:41

    RemoteServer.php:76 Reply

    not great but not terrible in this case. still, we should fix that service, stumbled upon it multiple times now.

    PreviewUriBuilder.php:53 Reply

    Done

    IntegrityService.php:31 Reply

    Done
  16. Christian Kuhn commented on patch set 7 01/30/25, 19:41

    Reply

    Done
  17. core-ci voted on patch set 7 V -1 01/30/25, 19:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73209

  18. Christian Kuhn uploaded patch set 8 V -1 01/30/25, 19:56

  19. core-ci voted on patch set 8 V +1 01/30/25, 20:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73211

  20. Christian Kuhn updated the commit message in patch set 9 V +1 01/30/25, 20:03

  21. Christian Kuhn voted on patch set 9 CR +1 V +1 01/30/25, 20:03

  22. core-ci voted on patch set 9 V +1 01/30/25, 20:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73212

  23. Andreas Kienast voted on patch set 9 CR +1 V +1 01/31/25, 13:17

  24. Benni Mack voted on patch set 9 CR +2 V +2 01/31/25, 13:26

  25. Benni Mack merged patch set 10 01/31/25, 13:26