Review main Merged

89648[TASK] Restrict Doctrine DBAL to minor version `4.2.*`

Stefan Bürk CR +2 V +2 Normal +31 −32 updated 06/10/25, 07:42

Commit message

Doctrine DBAL 4 forced TYPO3 to extend a couple of classes
as replacement for the dropped event system to ensure the
same functionaly and required to copy some code which is
considered internal and partly made private by Doctrine.

That requires to adopt changes in copied code over time,
and due to the consideration as internal code this happens
also within minor version like upcoming `4.3.0` [1][2][3].

To mitigate this for the TYPO3 user base the dependency is
restricted to minor version ranges to coordinate doctrine
updates with eventually required code adoptions and mitigate
breaking composer instances while keeping bugfix updates.

The TYPO3 Core Team strifes to align with the Doctrine Team
to find patterns that allow for more seamless integration in
frameworks like TYPO3 and reduce the burdon of copied code.

Used command(s):

BIN_COMPOSER="$( which composer )" \
&& ${BIN_COMPOSER} require \
  -d typo3/sysext/core --no-update --no-install \
  'doctrine/dbal':'4.2.*' \
&& ${BIN_COMPOSER} require \
  -d typo3/sysext/install --no-update --no-install \
  'doctrine/dbal':'4.2.*' \
&& ${BIN_COMPOSER} require \
  -d typo3/sysext/redirects --no-update --no-install \
  'doctrine/dbal':'4.2.*' \
&& ${BIN_COMPOSER} require -w \
  'doctrine/dbal':'4.2.*'

[1] https://github.com/doctrine/dbal/pull/6932
[2] https://github.com/doctrine/dbal/pull/6933
[3] https://github.com/doctrine/dbal/pull/6944

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Benjamin Franzke +1
    • Garvin Hicking +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Benjamin Franzke +1
    • Garvin Hicking +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 2536

Show 511 earlier messages
  1. Stefan Bürk uploaded patch set 1 06/05/25, 14:34

  2. core-ci voted on patch set 1 V -1 06/05/25, 14:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79935

  3. Stefan Bürk uploaded patch set 2 V -1 06/05/25, 15:07

  4. core-ci voted on patch set 2 V -1 06/05/25, 15:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79936

  5. Stefan Bürk uploaded patch set 3 V -1 06/05/25, 15:30

  6. core-ci voted on patch set 3 V -1 06/05/25, 15:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79939

  7. Stefan Bürk uploaded patch set 4 V -1 06/05/25, 16:49

  8. core-ci voted on patch set 4 V +1 06/05/25, 16:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79943

  9. core-ci commented on patch set 4 06/05/25, 17:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79945

  10. Stefan Bürk updated the commit message in patch set 5 V +1 06/05/25, 17:58

  11. core-ci voted on patch set 5 V +1 06/05/25, 18:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79947

  1. Stefan Bürk marked it ready for review 06/05/25, 18:23

  2. Garvin Hicking commented on patch set 5 06/05/25, 18:53

    CustomDoctrineTypesColumnDefinitionTrait.php:56

    ^ see comment a few lines down

    CustomDoctrineTypesColumnDefinitionTrait.php:87

    What about the use of $tableColumn['type'] at the start of this method, that doesn't need adoption too?

    PostgreSQLSchemaManager.php:159

    to avoid confusion, put "DBAL 4.3.x" here so it's not confused with a PostgreSQL version number?
  3. Stefan Bürk commented on patch set 5 06/05/25, 19:34

    CustomDoctrineTypesColumnDefinitionTrait.php:56 Reply

    see answer below.

    CustomDoctrineTypesColumnDefinitionTrait.php:87 Reply

    ``` $tableColumn['type'] !== $tableColumn['column_type'] ``` That's the point. DBAL 4.3.x splitted these information, and `$tableColumn['type']` would only contain `enum` now instead of for example `enum('v1', 'v2')` which is now provided in `$tableColumn['colum_type']`. Here at that place we need the full type information to extract the values from. L56 = `$dbType` is needed to determine the pure DoctrineType (aka JsonType, StringType, IntegerType and so forth) passed in L84 to the determinColumnType method). Depending on ongoing discussion the whole trait may vanish anyway or stay when the `*SchemaManager` xclasses / method overrides can be solved in another way - or at least stripped down to `SET` only. However, I wanted to avoid to much side changes and stay on the purly needed changes to mitigate the issue in a compat-like way.
  4. Stefan Bürk uploaded patch set 6 V +1 06/05/25, 19:40

  5. Stefan Bürk commented on patch set 6 06/05/25, 19:40

    PostgreSQLSchemaManager.php:159 Reply

    Done
  6. core-ci voted on patch set 6 V +1 06/05/25, 19:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79950

  7. Garvin Hicking commented on patch set 6 06/05/25, 20:08

    CustomDoctrineTypesColumnDefinitionTrait.php:87 Reply

    Done
  8. Benjamin Franzke commented on patch set 6 06/06/25, 13:52

    Should we pin to minor versions (~4.2.0 instead ^4.2.0) as long as we're using/extending that much internal API? We're always at risk that a minor doctrine/dbal update forces us into an irregular TYPO3 release in order to cope with possible changes.
    Does that mean we could upgrade to doctrine dbal 4.3 directly? As I understand this change is basically a soft-update to 4.3.x, even for existing 4.2.x users (because the 4.3 changes are now applied to the 4.2.x codease). Why couldn't we update to 4.3 directly? Possibility of dependency lock-in or are there other reasons?
  9. Stefan Bürk commented on patch set 6 06/06/25, 14:52

    Reply

    4.3.0 is not released yet. Without that change composer install would break if some would upgrade doctrine. pinin it now to a minor version would only disallow dbal 4.3.0 when releeased for the next TYPO3 version, but not for current released version. Pin it down does not help in all cases. This change is ment to have with next TYPO3 release a version in place which works with dbal 4.2.x and 4.3.x as a intermediate bridge. We can conside to ping do minor version (>=4.3.0 <4.4) when the 4.3.0 is there and we rased to it.
  10. Stefan Bürk uploaded patch set 7 V +1 06/10/25, 04:51

  11. Stefan Bürk commented on patch set 7 06/10/25, 04:52

    Reply

    Changed this change to pin doctrine to `4.2.*`

    Reply

    Done
  12. Stefan Bürk uploaded patch set 8 06/10/25, 04:54

  13. core-ci voted on patch set 7 V -1 06/10/25, 04:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80097

  14. core-ci voted on patch set 8 V +1 06/10/25, 05:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80099

  15. Garvin Hicking voted on patch set 8 CR +1 V +1 06/10/25, 05:07

  16. Garvin Hicking updated the commit message in patch set 9 CR +1 V +1 06/10/25, 05:09

  17. Garvin Hicking voted on patch set 9 CR +1 V +1 06/10/25, 05:09

  18. core-ci voted on patch set 9 V +1 06/10/25, 05:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80101

  19. Stefan Bürk commented on patch set 9 06/10/25, 05:19

  20. core-ci commented on patch set 9 06/10/25, 05:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80102

  21. Benni Mack voted on patch set 9 CR +1 V +1 06/10/25, 06:03

  22. Benjamin Franzke voted on patch set 9 CR +1 V +1 06/10/25, 06:23

  23. Benjamin Franzke commented on patch set 9 06/10/25, 06:23

    Reply

    thx!
  24. Stefan Bürk voted on patch set 9 CR +2 V +2 06/10/25, 07:29

  25. Stefan Bürk merged patch set 10 06/10/25, 07:42