Review main Merged

81426[FEATURE] Auto DB fields from TCA for type "radio"

Nikita Hovratov CR +2 V +2 Hard +306 −2 updated 10/16/23, 07:43

Commit message

Tables with TCA columns set to type="radio" do not
need an ext_tables.sql entry anymore. The core now
creates this field automatically.

This is one of many patches in this area: The v13 goal
is to obsolete ext_tables.sql in most cases by
creating default "business" fields of TCA tables
automatically.

The patch adds the main magic in class DefaultTcaSchema
and removes own ext_tables.sql definitions having
type=radio.

Note that values of type=radio can be both, integers
or strings. Items are checked for their values to
determine the best suited field type. These can
be varchar(255), smallint(6) or int(11).

Review

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

Issues 2

Files 5

Review log 2025

  1. Nikita Hovratov uploaded patch set 1 10/13/23, 15:33

  2. Benni Mack commented on patch set 1 10/13/23, 15:41

    I'm pretty sure we also have type=radio in sys_template ?
  3. core-ci voted on patch set 1 V -1 10/13/23, 15:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47745

  4. Nikita Hovratov commented on patch set 1 10/13/23, 15:50

    Reply

    Hm, where?^^
  5. Benni Mack commented on patch set 1 10/13/23, 16:05

    Reply

    ugh, nevermind :)
  6. Nikita Hovratov uploaded patch set 2 V -1 10/13/23, 16:10

  7. Nikita Hovratov updated the commit message in patch set 3 10/13/23, 16:10

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

  9. Oliver Klee voted on patch set 3 V +1 10/13/23, 16:35

  10. Anja Leichsenring voted on patch set 3 V +1 CR +1 10/14/23, 07:17

  11. Stefan Bürk commented on patch set 3 CR -1 10/14/23, 09:30

    on it (see comments) ...

    DefaultTcaSchema.php:803

    Please let's keep that in the method above for now. Basically a good move to split out, but we want to rethink/optimize the overall re-iterating anyway - having the same schema like above makes that kind of recuring - this now "breaks that"

    DefaultTcaSchema.php:812

    I think, we can rearrange the flow here a little bit and using in-between early returns. makes reading the building more streamline and and reduces the wonky-honky left-right jumps. Hard to explain, will push it later when I'm back at the pc ...
  12. Christian Kuhn commented on patch set 3 10/14/23, 10:49

    DefaultTcaSchema.php:803 Reply

    yeah. let's keep the one big method for now, and we refactor at the end.

    DefaultTcaSchema.php:841

    i personally would not have gone through that, since the difference between int and smallint is just a few bytes and very most likely not relevant in our use cases. let's keep it now that we have that distinction, but it wouldn't hurt much in case we decide to drop it later.
  13. Stefan Bürk uploaded patch set 4 CR +1 V +1 10/14/23, 12:12

  14. Stefan Bürk commented on patch set 4 10/14/23, 12:14

    DefaultTcaSchema.php:803 Reply

    Done

    DefaultTcaSchema.php:812 Reply

    Done

    DefaultTcaSchema.php:841 Reply

    Had the same thought - kept it for now.
  15. core-ci voted on patch set 4 V +1 10/14/23, 12:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47754

  16. Stefan Bürk uploaded patch set 5 V +1 10/14/23, 12:21

  17. Stefan Bürk voted on patch set 5 V +1 CR +1 10/14/23, 12:23

  18. Stefan Bürk commented on patch set 6 CR +1 V +1 10/14/23, 12:27

    Published edit on patch set 5.
  19. Stefan Bürk voted on patch set 6 V +1 CR +1 10/14/23, 12:28

  20. core-ci voted on patch set 5 V +1 10/14/23, 12:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47755

  21. core-ci voted on patch set 6 V +1 10/14/23, 12:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47757

  22. Christian Kuhn voted on patch set 6 V +1 CR +1 10/15/23, 10:28

  23. Anja Leichsenring voted on patch set 6 V +1 CR +1 10/16/23, 04:06

  24. Nikita Hovratov voted on patch set 6 V +2 CR +2 10/16/23, 07:43

  25. Nikita Hovratov merged patch set 7 10/16/23, 07:43