Review main Merged

82760[TASK] Simplify table handling in `DefaultTCASchema`

Stefan Bürk CR +2 V +2 Hard +280 −379 updated 02/14/24, 14:46

Commit message

With #103015 the table definition merge has been moved
to an earlier point, providing an associative array
with the table definitions.

This change modifies `DefaultTcaSchema` to operate on
that array and simplifies the required handling code.

More precise doc-block annotations for humans and
PHPStan are added along the way.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 3

Files 3

Review log 2432

Show 47 earlier messages
  1. Stefan Bürk uploaded patch set 1 02/01/24, 12:42

  2. core-ci voted on patch set 1 V +1 02/01/24, 12:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52584

  3. Stefan Bürk rebased onto patch set 2 V +1 02/01/24, 13:41

  4. core-ci voted on patch set 2 V +1 02/01/24, 13:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52592

  5. Stefan Bürk rebased onto patch set 3 V +1 02/05/24, 11:52

  6. core-ci voted on patch set 3 V +1 02/05/24, 12:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52719

  7. Oliver Klee commented on patch set 3 02/05/24, 12:03

    I still see a merge conflict here. Is that warning in Gerrit a false positive?
  1. Stefan Bürk commented on patch set 3 02/05/24, 12:21

    Reply

    Nope. That's because this change has a relation-chain with 82758: [TASK] Move table definition merge to `SchemaMigrator` | https://review.typo3.org/c/Packages/TYPO3.CMS/+/82758 - and merging it without the parent change is not possible, and therefore the merge conflict. Will resolve magically after parent change is merged.
  2. Stefan Bürk commented on patch set 3 02/05/24, 12:24

    Reply

    see ;)
  3. Oliver Klee commented on patch set 3 02/05/24, 12:32

    Reply

    Ah, I see. Thanks for the explanation!
  4. Stefan Bürk rebased onto patch set 4 02/05/24, 12:38

    Copied Votes: * Verified+1 (copy condition: "**changekind:NO_CHANGE**")
  5. core-ci voted on patch set 4 V +1 02/05/24, 12:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52724

  6. Oliver Klee voted on patch set 4 V +1 02/05/24, 13:07

  7. Oliver Klee voted on patch set 4 CR +1 02/05/24, 13:09

  8. Christian Kuhn commented on patch set 4 02/05/24, 15:05

    DefaultTcaSchema.php:25

    exception still needed or can be removed altogether?
  9. Christian Kuhn uploaded patch set 5 CR +1 V +1 02/05/24, 15:05

  10. Oliver Klee voted on patch set 5 CR +1 V +1 02/05/24, 15:06

  11. core-ci voted on patch set 5 V +1 02/05/24, 15:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52740

  12. Stefan Bürk voted on patch set 5 CR -1 02/05/24, 15:56

  13. Stefan Bürk commented on patch set 5 02/05/24, 16:02

    DefaultTcaSchema.php:25 Reply

    I guess we need it still at least at one point, so I moved the exception throw to that place directly and still keep removing the old generic loop method. TBH - not sure if this can be hit or not. But that's the only place I think there is a change it can still happen that a table is not in the tables array already.
  14. Stefan Bürk uploaded patch set 6 CR +1 V +1 02/05/24, 16:04

  15. core-ci voted on patch set 6 V +1 02/05/24, 16:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52743

  16. Stefan Bürk rebased onto patch set 7 V +1 02/14/24, 08:41

  17. core-ci voted on patch set 7 V +1 02/14/24, 08:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53190

  18. Oliver Klee commented on patch set 7 02/14/24, 12:15

    SchemaMigrator.php:250

    At this point in the control flow, `$tables` can also have numeric keys, e.g., from line 246. I think this line here with the annotation is not necessary.
  19. Stefan Bürk commented on patch set 7 02/14/24, 12:32

    DefaultTcaSchema.php:25 Reply

    Done

    SchemaMigrator.php:250 Reply

    Before the call it "could" be both, after mergeTableDefintions() it is string based only. Removed the docblock now.
  20. Stefan Bürk uploaded patch set 8 V +1 02/14/24, 12:32

  21. core-ci voted on patch set 8 V +1 02/14/24, 12:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53192

  22. Oliver Klee voted on patch set 8 CR +1 V +1 02/14/24, 12:56

  23. Christian Kuhn voted on patch set 8 CR +1 V +1 02/14/24, 13:59

  24. Stefan Bürk voted on patch set 8 CR +2 V +2 02/14/24, 14:46

  25. Stefan Bürk merged patch set 9 02/14/24, 14:46