Review main Merged

94948[TASK] Introduce typed DTO for form persistenceManager configuration

Josua Vogel CR +2 V +2 Normal +98 −18 updated 07/27/26, 13:56

Commit message

The "persistenceManager" section of the form YAML configuration was
accessed throughout the codebase via loosely typed array lookups such
as `$formSettings['persistenceManager']['sortAscending'] ?? true`.
This scattered the default values across multiple classes and offered
no type safety or single source of truth for the available options.

A new `PersistenceManagerConfiguration` DTO now provides a typed
representation of the configuration with explicit defaults for every
option.

The DTO ships a `fromArray()` factory that normalizes the raw
configuration, including re-indexing of the string lists which may use
associative ordering keys (e.g. `10:`, `20:`) in YAML.

All direct array accesses to `persistenceManager` options are replaced
by the DTO.

Review

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

Issues 1

Files 5

Review log 67

  1. Josua Vogel uploaded patch set 1 07/26/26, 17:45

  2. core-ci voted on patch set 1 V +1 07/26/26, 17:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105428

  3. Garvin Hicking commented on patch set 1 07/26/26, 19:08

    Nice idea!

    PersistenceManagerConfiguration.php:52

    Lets make this `null | array` and initialize the empty array in this method here. That would make the consuming code calls a bit more lightweight, what do you think?
  4. Josua Vogel commented on patch set 1 07/27/26, 05:32

    PersistenceManagerConfiguration.php:52 Reply

    I think we would get an "Undefined array key" warning if we remove the null guard from the caller. I can change it to $formSettings['persistenceManager'] ?? null, but I don't think that would be a improvement.
  5. Garvin Hicking commented on patch set 1 CR +1 V +1 07/27/26, 06:20

    PersistenceManagerConfiguration.php:52 Reply

    Oops. Don't mind me. ;)
  6. Benni Mack voted on patch set 1 CR +2 V +2 07/27/26, 13:56

  7. Benni Mack merged patch set 2 07/27/26, 13:56