Review main Merged

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

Stefan Bürk CR +2 V +2 Easy +15 −25 updated 04/02/25, 11:07

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
    • Georg Ringer +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 3

Files 6

Review log 710

  1. Stefan Bürk uploaded patch set 1 04/02/25, 09:28

  2. core-ci voted on patch set 1 V +1 04/02/25, 09:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76851

  3. Stefan Bürk updated the commit message in patch set 2 V +1 04/02/25, 09:58

  4. Garvin Hicking voted on patch set 2 CR +1 V +1 04/02/25, 10:01

  5. core-ci voted on patch set 2 V +1 04/02/25, 10:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76855

  6. Stefan Bürk updated the commit message in patch set 3 CR +1 V +1 04/02/25, 10:20

  7. core-ci voted on patch set 3 V +1 04/02/25, 10:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76860

  8. Garvin Hicking voted on patch set 3 CR +1 V +1 04/02/25, 10:29

  9. Georg Ringer voted on patch set 3 CR +2 V +2 04/02/25, 11:07

  10. Georg Ringer merged patch set 4 04/02/25, 11:07