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

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 17