Review 13.4 Merged

88913[TASK] Adjust `EnumType` and `SetType` type schema handling

Georg Ringer CR +2 V +2 Easy +15 −25 updated 04/02/25, 11:31

Commit message

With `doctrine/dbal 4.2.0` the `enum` has been added directly
in DBAL, implementing it slightly different than the original
TYPO3 implementation, which has been mitigated with #105279
and adopted for the `set` type in advance with #105294.

TYPO3 still needs to adopt the options reading existing database
schema provided by a trait to the extended platform classes and
missed to pass the `enum` and `set` option values as `values` to
the `Column` objects instead as `platformOption` key, hidden by
the fact that getting the array representation of a column merges
the platformOptions on the same level with the direct value options.

Upcoming `doctrine/dbal` introduces more phpdoc-block array shapes,
narrowing down possible (allowed) array keys for `platformOptions`
and failing with phpstan in core tests while not beeing a technical
issue.

This change adjusts related code within the `ext_tables.sql` related
`TableBuilder` and the platform trait reading the values and setting
it to `Column` objects as value property instead of `platformOption`.

Considered as task and not as bugfix due to the fact that this is
only static code analysis related and not technically breaking.

Minor left-over in the `SetType` implementation for `doctrine/dbal 4.0`
is removed along the way.

Tested and extracted from doctrine/dbal 4.3.x test,
see: https://review.typo3.org/c/Packages/TYPO3.CMS/+/88596

[1] https://github.com/doctrine/dbal/pull/6536
[2] https://github.com/doctrine/dbal/releases/tag/4.2.0

Review

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

Issues 3

Files 6

Review log 34

  1. Georg Ringer commented on patch set 1 04/02/25, 11:07

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

  3. Stefan Bürk voted on patch set 1 CR +2 V +2 04/02/25, 11:31

  4. Stefan Bürk merged patch set 2 04/02/25, 11:31