Review main Merged

86561[TASK] Replace TYPO3 `EnumType` with doctrine/dbal type

Stefan Bürk CR +2 V +2 Hard +144 −162 updated 10/13/24, 15:26

Commit message

Doctrine DBAL 4.2.0 implemented an `EnumType`. This
conflicts with an existing TYPO3 implementation.

The TYPO3 implementation does not supported DBMS apart
from MariaDB/MySQL. The new DBAL implementation does not
contain a fully working replacement either.

The database analyzer however benefits from the Doctrine
DBAL type and can create compatible fields for database
systems not having native `ENUM` support when replaced.

The patch switches to the new doctrine/dbal implementation.

The patch:

* No longer registers the TYPO3 custom enum type for TYPO3
  managed connections retrieved through the `ConnectionPool`.
* Upgrades to Doctrine DBAL 4.2.1 as minimum version to
  ensure the doctrine/dbal type exists.
* Removes now obsolete code and workarounds at several places
  related to the TYPO3 EnumType.
* Activates EnumType SchemaMigrator tests with all TYPO3
  supported database systems.
* Removes the TYPO3 EnumType class and adds a class alias
  to the doctrine/dbal implementaton for maximum compatibility.

> composer require --no-update -d typo3/sysext/core doctrine/dbal:"^4.2.1"
> composer require --no-update -d typo3/sysext/redirects doctrine/dbal:"^4.2.1"
> composer require --no-update -d typo3/sysext/install doctrine/dbal:"^4.2.1"
> composer require doctrine/dbal:"^4.2.1"

Note TYPO3 13.x composer mode instances before 13.4 should
probably set a conflict to doctrin/dbal:^4.2.x. This situation
resolves itself with the 13.4.0 release in a couple of days.

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

Review

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

Issues 1

Files 17

Review log 2031

Show 36 earlier messages
  1. Stefan Bürk uploaded patch set 1 10/11/24, 16:27

  2. core-ci voted on patch set 1 V -1 10/11/24, 16:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67609

  3. Stefan Bürk uploaded patch set 2 V -1 10/11/24, 17:20

  4. core-ci voted on patch set 2 V -1 10/11/24, 17:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67612

  5. Stefan Bürk uploaded patch set 3 V -1 10/11/24, 17:49

  6. core-ci voted on patch set 3 V +1 10/11/24, 17:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67614

  1. Stefan Bürk uploaded patch set 4 V +1 10/11/24, 18:39

  2. Stefan Bürk updated the commit message in patch set 5 10/11/24, 18:42

  3. core-ci voted on patch set 5 V +1 10/11/24, 18:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67616

  4. core-ci voted on patch set 5 V -1 10/11/24, 19:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67617

  5. Stefan Bürk updated the commit message in patch set 6 V -1 10/11/24, 19:15

  6. core-ci voted on patch set 6 V +1 10/11/24, 19:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67618

  7. Stefan Bürk rebased onto patch set 7 V +1 10/11/24, 19:34

  8. core-ci voted on patch set 7 V +1 10/11/24, 19:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67620

  9. core-ci commented on patch set 7 10/11/24, 19:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67621

  10. Nikita Hovratov voted on patch set 7 CR +1 10/11/24, 22:30

  11. Stefan Bürk updated the commit message in patch set 8 CR +1 V +1 10/12/24, 08:17

  12. core-ci voted on patch set 8 V +1 10/12/24, 08:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67640

  13. Christian Kuhn commented on patch set 8 CR -1 10/12/24, 10:42

    i'll apply some wording changes.
  14. Christian Kuhn uploaded patch set 9 CR -1 V +1 10/12/24, 10:58

  15. Christian Kuhn voted on patch set 9 CR +1 V +1 10/12/24, 10:59

  16. core-ci voted on patch set 9 V +1 10/12/24, 11:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67643

  17. Garvin Hicking commented on patch set 9 CR +1 V +1 10/12/24, 11:57

    minor spelling, can also apply in a rst cleanup later.

    Deprecation-105279-ReplaceTYPO3EnumTypeWithDoctrinedbalEnumType.rst:14

    did provide -> provided

    Deprecation-105279-ReplaceTYPO3EnumTypeWithDoctrinedbalEnumType.rst:25

    space before dot
  18. Garvin Hicking commented on patch set 10 CR +1 V +1 10/12/24, 12:17

    Published edit on patch set 9.
  19. Garvin Hicking commented on patch set 10 CR +1 V +1 10/12/24, 12:17

    Deprecation-105279-ReplaceTYPO3EnumTypeWithDoctrinedbalEnumType.rst:14 Reply

    Done

    Deprecation-105279-ReplaceTYPO3EnumTypeWithDoctrinedbalEnumType.rst:25 Reply

    Done
  20. core-ci voted on patch set 10 V +1 10/12/24, 12:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67647

  21. Christian Kuhn voted on patch set 10 CR +1 V +1 10/12/24, 13:05

  22. Stefan Bürk voted on patch set 10 CR +2 V +2 10/12/24, 13:05

  23. Stefan Bürk merged patch set 11 10/12/24, 13:05

  24. Benjamin Franzke commented on patch set 11 10/12/24, 14:38

    ClassAliasMap.php:1

    This ClassAliasMap has not been registered in /composer.json and /typo3/sysext/core/composer.json
  25. Stefan Bürk commented on patch set 11 10/13/24, 15:26

    ClassAliasMap.php:1 Reply

    Thanks, missed that. Correct(ed) with https://review.typo3.org/c/Packages/TYPO3.CMS/+/86575