Review main Merged

70819[FEATURE] Support multiple starting points in selectTree

Andreas Kienast CR +2 V +2 Hard +632 −69 updated 09/03/21, 12:06

Commit message

A new TCA config `treeConfig/startingPoints` is introduced for selectTree
and category to allow multiple "roots" for the rendered tree.

This new settings superseds and deprecates `treeConfig/rootUid` being
capable of rendering only one root node.

To be able to re-use `AbstractItemProviderparseSiteConfiguration()`
without the implicit quoting, the method is split into separate parts.

Review

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

Issues 1

Files 13

Review log 2131

Show 56 earlier messages
  1. Andreas Kienast uploaded patch set 1 08/30/21, 09:20

  2. core-ci voted on patch set 1 V -1 08/30/21, 09:39 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15846

  3. Oli Bartsch commented on patch set 1 08/30/21, 09:44

    TcaCategory.php:139

    What do you think about just removing rootUid and adding a TcaMigration? This is the usual way for TCA options as it makes the migration path much smoother for both, core and integrators.

    TcaSelectTreeItemsTest.php:258

    Maybe we should stick to csv here to not overcomplicate things for integrators. See for example "nonSelectableLevels". Why should an integrator configure uids in two different ways for the same element.
  4. Andreas Kienast commented on patch set 1 08/30/21, 10:08

    TcaCategory.php:139 Reply

    Thanks, great idea.

    TcaSelectTreeItemsTest.php:258 Reply Unresolved

    IMO it's cleaner to use arrays where multiple values are accepted, this saves some overhead with string-to-array conversions and such. I don't have hard feelings here, we can do a GU:intExplode() where this setting is evaluated as well.
  5. Andreas Kienast commented on patch set 1 08/30/21, 10:17

    TcaCategory.php:139 Reply Unresolved

    Ah, here it's about PageTS. AFAICS this is not covered by TcaMigration.
  6. Andreas Kienast uploaded patch set 2 08/30/21, 10:25

  1. Andreas Kienast uploaded patch set 3 08/30/21, 10:26

  2. core-ci voted on patch set 2 V -1 08/30/21, 10:44 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15851

  3. core-ci voted on patch set 3 V -1 08/30/21, 10:45 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15852

  4. Andreas Kienast uploaded patch set 4 08/30/21, 11:57

  5. core-ci voted on patch set 4 V +1 08/30/21, 12:08 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15860

  6. Andreas Kienast uploaded patch set 5 08/30/21, 14:48

  7. Andreas Kienast updated the commit message in patch set 6 08/30/21, 14:48

  8. core-ci voted on patch set 6 V +1 08/30/21, 15:12 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15875

  9. core-ci voted on patch set 5 V -1 08/30/21, 15:15 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15874

  10. Oli Bartsch commented on patch set 6 08/30/21, 19:43

    TcaMigration.php:527

    treeConfig

    TcaMigration.php:532

    Let's also add tests for this new migration.

    TcaMigration.php:532

    What do you think about migrateRootUidToStartingPoints()?

    TcaMigration.php:540

    Could be simplified: (int)($fieldConfig['config']['treeConfig']['rootUid'] ?? 0) !== 0 We may also want to use this as a guard clause, like the other migrations do.

    DatabaseTreeDataProvider.php:219

    Shouldn't this trigger a deprecation log entry? Also extension scanner support might be added.

    DatabaseTreeDataProvider.php:228

    In case we only deprecate this, we need some compat layer here. Otherwise this looks breaking as it's no longer set anywhere in core.
  11. Andreas Kienast commented on patch set 6 CR -1 08/30/21, 20:01

    TcaMigration.php:527 Reply

    Ack

    TcaMigration.php:532 Reply

    Ack

    TcaMigration.php:532 Reply

    Ack

    TcaMigration.php:540 Reply

    Ack

    DatabaseTreeDataProvider.php:219 Reply Unresolved

    I had a deprecation trigger here at first, but wasn't sure if that would spam the log.

    DatabaseTreeDataProvider.php:228 Reply Unresolved

    The setter was previously called in TreeDataProviderFactory, which became obsolete due to the TCA migration. Since the class is not internal, once _could_ use this in 3rd party code. We might should use is there again.
  12. Andreas Kienast uploaded patch set 7 08/30/21, 20:11

  13. Andreas Kienast uploaded patch set 8 08/30/21, 20:19

  14. core-ci voted on patch set 7 V +1 08/30/21, 20:31 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15893

  15. core-ci voted on patch set 8 V +1 08/30/21, 20:36 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15896

  16. Oli Bartsch uploaded patch set 9 09/03/21, 10:40

  17. Oli Bartsch voted on patch set 9 V +1 CR +1 09/03/21, 10:44

  18. core-ci voted on patch set 9 V +1 09/03/21, 10:53 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16168

  19. Oli Bartsch commented on patch set 9 V 0 CR -1 09/03/21, 10:53

    On it again
  20. Oli Bartsch uploaded patch set 10 09/03/21, 11:12

  21. core-ci voted on patch set 10 V +1 09/03/21, 11:27 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16169

  22. Oli Bartsch voted on patch set 10 V +1 CR +1 09/03/21, 11:39

  23. Benni Mack voted on patch set 10 V +1 CR +1 09/03/21, 11:53

  24. Andreas Kienast voted on patch set 10 V +2 CR +2 09/03/21, 12:06

  25. Andreas Kienast merged patch set 11 09/03/21, 12:06