Review main Merged

75204[TASK] Bump the Doctrine dependencies

Oliver Klee CR +2 V +2 Normal +54 −55 updated 07/16/22, 20:42

Commit message

Used commands:

> composer req -W doctrine/annotations:^1.13.3 doctrine/dbal:^3.3.7 \
  doctrine/event-manager:^1.1.1
> composer req doctrine/annotations:^1.13.3 doctrine/dbal:^3.3.7 \
  doctrine/event-manager:^1.1.1 -d typo3/sysext/core --no-update
> composer req doctrine/dbal:^3.3.7 -d typo3/sysext/install --no-update
> composer req doctrine/dbal:^3.3.7 -d typo3/sysext/redirects --no-update

Also make use of a Doctrine-DBAL-provided PHPStan/Psalm type to satisfy
the required types for the new DBAL version.

Review

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

Issues 1

Files 6

Review log 1720

  1. Oliver Klee uploaded patch set 1 07/16/22, 08:22

  2. core-ci voted on patch set 1 V +1 07/16/22, 08:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29262

  3. Stefan Bürk commented on patch set 1 07/16/22, 11:21

    ConnectionMigrator.php:325

    Not sure about this - may be a change in behaviour eventually. More curious, commit message says it is no longer supported - can you give us/me some readup or more detailed why this is no longer supported and from who (doctrine??) At least, could not find anything on the doctrine side which states that this is no longer supported .... And should be linked in commit also than.
  4. Oliver Klee commented on patch set 1 07/16/22, 11:40

    ConnectionMigrator.php:325 Reply

    In Doctrine DBAL 3.3.7, getParams returns the artificial type "Params": https://github.com/doctrine/dbal/blob/3.3.7/src/Connection.php#L217 Params is defined here: https://github.com/doctrine/dbal/blob/3.3.7/src/DriverManager.php#L45 This array does not have the key "tableoptions", and the string "tableoptions" cannot be found in the current Doctrine DBAL source. (I don't know if it was there earlier at all, and if so, when and why it was removed. At least the string was not there in the version 3.3.2 we are currently using in main, not in version 2.13.8 which we're using on 11.5, and not in 2.10.4 which we're using in 10.4.) The more expressive type for the params was introduced here, which allowed PHPStan to find out that we're using an array key that was not expected: https://github.com/doctrine/dbal/commit/e6add2943187cdf01599e198a77bb6d3672703ab#diff-ba32305492ce868ffbe5d8e82a489cfd4fdae7a0f13d805fa462af2adf1b6bbd There is a "defaultTableOptions" key though: https://github.com/doctrine/dbal/commit/b0083485ea903b71990b0449303007ef69c2cdde It's also available/used in the code in Doctrine DBAL 3.3.2 and 2.13.8 as well, so we might have a bugfix change first (for main and 11.5) that switches to that array key. What do you think?
  5. Stefan Bürk commented on patch set 1 07/16/22, 13:00

    ConnectionMigrator.php:325 Reply

    That was the patch which added that: https://review.typo3.org/c/Packages/TYPO3.CMS/+/56440/ Reading the correspondign feature ReST in this patch, it may be possible that this is a "typo3 => doctrine" translation ..." from "tableoptions" => "defaultTableOptions" And still, this is how Typo3 writes it into the "LocalConfiguration.php" ``` 'DB' => [ 'Connections' => [ 'Default' => [ 'charset' => 'utf8mb4', 'dbname' => 't3cmain', 'driver' => 'mysqli', 'host' => '127.0.0.1', 'password' => 'ZDeK92a3', 'port' => 8806, 'tableoptions' => [ 'charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci', ], 'user' => 'root', ], ], ], ``` So, simply dropping this here is a "breaking" change and change in behaviour, I would guess.
  6. Oliver Klee commented on patch set 1 07/16/22, 13:05

    ConnectionMigrator.php:325 Reply

    So we probably need to translate from the TYPO3 settings to the Doctrine settings somehow (as a separate bugfix).
  7. Stefan Bürk commented on patch set 1 07/16/22, 13:13

    ConnectionMigrator.php:325 Reply

    You removed this translation with this patch for the compare feature. Not sure why it is only done there and not directly. Simply dropping it here is however wrong. Not sure if it is good idea to directly use "defaultTableOptions" as key in the Typo3 configuration (with corresponding changes) and a upgrade wizard taking care on a update etc .... using it directly may have side effects. Than this transformation code can be removed - but not until then. Either we leave the phpstan imported types out until then or migrate/change that in a pre-patch. Using a "phpstan ignore" here is a no-never-do-that-option.
  8. Oliver Klee commented on patch set 1 CR -1 07/16/22, 13:54

    We'll split this up (after we have found out how the conversion from tableoptions to defaultTableOptions works).
  9. Stefan Bürk commented on patch set 1 07/16/22, 19:09

  10. Stefan Bürk uploaded patch set 2 07/16/22, 20:08

  11. Stefan Bürk updated the commit message in patch set 3 07/16/22, 20:09

  12. Christian Kuhn commented on patch set 3 07/16/22, 20:10

    ConnectionMigrator.php:325 Reply

    Done
  13. Christian Kuhn commented on patch set 3 07/16/22, 20:11

    ConnectionMigrator.php:1157

    needs to stay.
  14. Christian Kuhn commented on patch set 3 07/16/22, 20:11

    ConnectionMigrator.php:1157 Reply

    Done
  15. Stefan Bürk uploaded patch set 4 07/16/22, 20:12

  16. core-ci voted on patch set 4 V +1 07/16/22, 20:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29298

  17. core-ci commented on patch set 4 07/16/22, 20:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29299

  18. Christian Kuhn voted on patch set 4 V +1 CR +1 07/16/22, 20:41

  19. Stefan Bürk voted on patch set 4 V +2 CR +2 07/16/22, 20:42

  20. Stefan Bürk merged patch set 5 07/16/22, 20:42