Skip to content
Snippets Groups Projects
Commit 410adb76 authored by Stefan Bürk's avatar Stefan Bürk
Browse files

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

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

Resolves: #102866
Releases: main
Change-Id: I59b06c42ae7087bf830ca56b8114e85673837453
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82514


Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarGarvin Hicking <gh@faktor-e.de>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarGarvin Hicking <gh@faktor-e.de>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 0a28d08c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment