Review 13.4 Merged

88155[BUGFIX] TCA Schema API: Clarify default values

Benni Mack CR +2 V +2 Hard +316 −3 updated 05/26/25, 07:05

Commit message

DataHandler uses the TCA Schema API to add default values from TCA.
The default value `null` is now set as default, if configured.
A new method `FieldTypeInterface->hasDefaultValue(): bool` has been
introduced to indicate, if default values are set or not.

If `$GLOBALS['TCA'][$table]['columns'][$field]['config']['nullable']`
isn't available for a specific type, `isNullable()` returns
always `false`.

If `$GLOBALS['TCA'][$table]['columns'][$field]['config']['default'] `
isn't available for a specific type, `hasDefaultValue()` returns
always `false`.

For TCA config > types `slug` and `uuid` `hasDefaultValue()`
always return `true` and `getDefaultValue()` always returns an
empty string, as both needs it to initiate the generation.

Review

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

Issues 1

Files 20

Review log 68

  1. Benni Mack commented on patch set 1 02/10/25, 20:41

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 02/10/25, 20:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73939

  3. Benni Mack abandoned the change 02/13/25, 07:29

  4. Benni Mack restored the change 05/26/25, 06:58

  5. Benni Mack commented on patch set 2 V +1 05/26/25, 06:58

    Cherry Picked from branch main.
  6. core-ci voted on patch set 2 V +1 05/26/25, 07:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79467

  7. Benni Mack voted on patch set 2 CR +2 V +2 05/26/25, 07:05

  8. Benni Mack merged patch set 3 05/26/25, 07:05