Review main Merged

86078[TASK] Enrich TCA from BeforeTcaOverridesEvent

Nikita Hovratov CR +2 V +2 Easy +1 −1 updated 09/16/24, 10:43

Commit message

The naming of BeforeTcaOverridesEvent is a little unfortunate as it
could also be named AfterBaseTcaEvent. It was specifically meant to
enable extension authors to add base TCA in a dynamic manner. Thus,
it should also benefit from TCA enrichment.

This is important for the Content Blocks extension, as it may drop
the TCA generation of system columns and let the Core do the heavy
lifting.

Review

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

Issues 2

Files 1

Review log 1317

  1. Nikita Hovratov uploaded patch set 1 09/13/24, 00:29

  2. Nikita Hovratov rebased onto patch set 2 09/13/24, 00:30

  3. core-ci voted on patch set 2 V +1 09/13/24, 00:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65615

  4. core-ci voted on patch set 1 V +1 09/13/24, 00:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65614

  5. Nikita Hovratov commented on patch set 2 09/13/24, 00:53

    See Content Blocks Pull request for reference: https://github.com/nhovratov/content-blocks/pull/247
  6. Stefan Bürk commented on patch set 2 09/14/24, 01:44

    TcaFactory.php:67

    enrichTca ensures to enrich missing fields for TCA tables - would it not make sense to have it called multiple times ? * before the event * after the event * and after tca overrides has been loaded again It can also be postulated the it is helpfull to have the already loaded TCA enriched with missing data before the event is dispatched - or not ? Not sure about the impact ....
  7. Nikita Hovratov commented on patch set 2 09/15/24, 10:21

    TcaFactory.php:67 Reply

    Well, of course we could call it before and after the event, but for my case I don't depend on defined system columns. And I don't think others should either. As this is still a new Event and the enrichment came afterwards, I believe the impact is very low. On the other hand it helps the Content Blocks extension tremendously.
  8. Christian Kuhn commented on patch set 2 CR +1 V +1 09/16/24, 10:11

    when i added enrich(), i wasn't sure if the event should be fired before or after. i think the naming isn't perfect anymore, but i'd say the impact is codewise rather small, and if it helps content blocks and others to first fire event, then enrich ... fine with me.
  9. Christian Kuhn updated the commit message in patch set 3 CR +1 V +1 09/16/24, 10:12

  10. Christian Kuhn commented on patch set 3 09/16/24, 10:13

    TcaFactory.php:67 Reply

    i'd say the naming of the event isn't perfect, and i also didn't wanted to change it when i introduced enrich(). imho, ok to keep this for now and *not* introduce yet another event and rename the old or something.
  11. Christian Kuhn rebased onto patch set 4 09/16/24, 10:13

  12. Christian Kuhn voted on patch set 4 CR +1 V +1 09/16/24, 10:13

  13. core-ci voted on patch set 3 V +1 09/16/24, 10:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65873

  14. core-ci voted on patch set 4 V +1 09/16/24, 10:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65874

  15. Stefan Bürk voted on patch set 4 CR +1 V +1 09/16/24, 10:31

  16. Christian Kuhn voted on patch set 4 CR +2 V +2 09/16/24, 10:43

  17. Christian Kuhn merged patch set 5 09/16/24, 10:43