Review main Merged

92541[BUGFIX] Handle null item values in TCA select field schema generation

Benni Mack CR +2 V +2 Normal +181 −4 updated 02/27/26, 08:41

Commit message

When a TCA select field with foreign_table has an item with
value => null (representing "no selection"), the schema analyzer
now correctly generates a nullable INT column instead of VARCHAR.

The null value is treated as compatible with integer columns,
and the column is created with DEFAULT NULL when appropriate.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 810

  1. Benni Mack uploaded patch set 1 01/27/26, 20:40

  2. core-ci voted on patch set 1 V +1 01/27/26, 20:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94448

  3. Oliver Klee voted on patch set 1 V +1 01/28/26, 16:31

  4. Georg Ringer commented on patch set 1 CR -1 02/06/26, 10:58

    shouldn't that also work for strings? 'items' => [ ['label' => 'Default', 'value' => null], ['label' => 'foo 2', 'value' => 'bar'], ], 'default' => null, => still leads to ALTER TABLE `tx_styleguide_elements_select` ADD `select_single_24` VARCHAR(255) DEFAULT '' NOT NULL it works if 'bar' is 1
  5. Benni Mack uploaded patch set 2 CR -1 V +1 02/08/26, 10:00

  6. core-ci voted on patch set 2 V +1 02/08/26, 10:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95404

  7. Georg Ringer voted on patch set 2 CR +1 V +1 02/27/26, 07:55

  8. Garvin Hicking commented on patch set 2 CR +1 V +1 02/27/26, 08:39

    good one thx!
  9. Benni Mack voted on patch set 2 CR +2 V +2 02/27/26, 08:41

  10. Benni Mack merged patch set 3 02/27/26, 08:41