Review main Merged

81797[TASK] Avoid deprecated method `Platform->getName()`

Stefan Bürk CR +2 V +2 Hard +200 −219 updated 11/20/23, 17:55

Commit message

The doctrine team has deprecated the method `getName()`
on the platform classes with `doctrine/dbal 3.8.x` [1]
and will be removed with `doctrine/dbal 4.x`.

With #102402 the platform classes has been extended and
the `getName()` method cloned for the extendend platform
classes.

To provide platform aware code, the suggested way to avoid
the deprecated `getName()` method is to use `instanceof`
checks.

This change modifies userland code to replace the deprecated
`Platform->getName()` with `instanceof` checks. Additionally,
the unit test `MockPlatform()` is split into dedicated
mock-classes extending the original doctrine classes along
with the test setups.

[1] https://github.com/doctrine/dbal/blob/3.8.x/UPGRADE.md#deprecated-abstractplatformgetname

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 2

Files 17

Review log 1117

  1. Stefan Bürk uploaded patch set 1 11/20/23, 12:41

  2. core-ci voted on patch set 1 V -1 11/20/23, 12:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49128

  3. Stefan Bürk uploaded patch set 2 V -1 11/20/23, 15:13

  4. core-ci voted on patch set 2 V +1 11/20/23, 15:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49146

  5. Stefan Bürk wrote 11/20/23, 16:04

    Topic set to doctrine-dbal
  6. Christian Kuhn updated the commit message in patch set 3 V +1 11/20/23, 16:59

  7. Christian Kuhn uploaded patch set 4 11/20/23, 17:02

  8. core-ci voted on patch set 3 V +1 11/20/23, 17:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49163

  9. core-ci voted on patch set 4 V +1 11/20/23, 17:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49165

  10. Christian Kuhn uploaded patch set 5 V +1 11/20/23, 17:27

  11. core-ci voted on patch set 5 V +1 11/20/23, 17:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49173

  12. Garvin Hicking uploaded patch set 6 V +1 11/20/23, 17:38

  13. core-ci voted on patch set 6 V +1 11/20/23, 17:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49174

  14. Garvin Hicking voted on patch set 6 V +1 CR +1 11/20/23, 17:45

  15. Christian Kuhn voted on patch set 6 V +1 CR +1 11/20/23, 17:46

  16. Stefan Bürk voted on patch set 6 V +2 CR +2 11/20/23, 17:55

  17. Stefan Bürk merged patch set 7 11/20/23, 17:55