Review main Merged

82514[TASK] Mitigate deprecated maximum length methods of `AbstractPlatform`

Stefan Bürk CR +2 V +2 Normal +76 −3 updated 01/18/24, 19:59

Commit message

Relying on the default and the maximum column lengths provided by the
Doctrine DBAL is deprecated. The following AbstractPlatform methods
and their implementations in specific platforms have been deprecated:

- AbstractPlatform::getCharMaxLength()
- AbstractPlatform::getVarcharDefaultLength()
- AbstractPlatform::getVarcharMaxLength()
- AbstractPlatform::getBinaryDefaultLength()
- AbstractPlatform::getBinaryMaxLength()

If required by the target platform(s), the column length should be
specified based on the application logic.

Therefore, the `ConnectionMigrator` is getting a new normalization
method specific for this case along with a generic looper which will
be extended in following changes.

As a drive-by the connection class annotations are changed to an
alias from `\TYPO3\CMS\Core\Database\Connection` to `Typo3Connection`.

[1] https://github.com/doctrine/dbal/blob/3.8.x/UPGRADE.md#deprecated-abstractplatform-methods-that-describe-the-default-and-the-maximum-column-lengths
[2] https://github.com/doctrine/dbal/blob/3.8.x/UPGRADE.md#added-runtime-deprecations-for-the-default-string-column-length
[3] https://github.com/doctrine/dbal/blob/4.0.x/UPGRADE.md#bc-break-changes-to-handling-binary-fields

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 1

Review log 68

  1. Stefan Bürk uploaded patch set 1 01/18/24, 16:54

  2. core-ci voted on patch set 1 V +1 01/18/24, 17:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51773

  3. Stefan Bürk updated the commit message in patch set 2 V +1 01/18/24, 17:22

  4. core-ci voted on patch set 2 V +1 01/18/24, 17:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51774

  5. Christian Kuhn voted on patch set 2 CR +1 V +1 01/18/24, 17:42

  6. Garvin Hicking voted on patch set 2 CR +1 V +1 01/18/24, 19:43

  7. Stefan Bürk voted on patch set 2 CR +2 V +2 01/18/24, 19:59

  8. Stefan Bürk merged patch set 3 01/18/24, 19:59