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

[BUGFIX] Ensure `Comparator` knows the current platform

Doctrine DBAL 3.x has been introduced into TYPO3 v12
with #96287 and raised over the time, adding the one
or other deprecation and dual code branches and some
compat layers.

The `\Doctrine\DBAL\Schema\Comparator::compareSchemas()`
for example is still static and instantiaces itself,
and therefore not properly handing over the platform.
The missing platform does not execute the new way of
using `AbstractPlatform::columnsEqual()`, but renders
the platform specific handlings useless - specially
added for MySQL based platforms, for example the
datbase type `TEXT` length check and comparision.

This change passes the platform down to the inner
`Comparator` instance to ensure that the platform
specific handling can work. To avoid the new way
using the `AbstractPlatform::columnsEqual()` which
introduces incompatible checks for now, that method
is overriden and the `diffColumn()` check used.

That allows the proper TEXT sub-type handling with
MySQL and MariaDB while supressing noise for now.

Note: This is also done currently in TYPO3 v13.

Resolves: #103348
Related: #96287 (Doctrine DBAL 3.2)
Releases: 12.4
Change-Id: If130c73ff122d09a50158bc3ac53f28f9a4eb749
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83457


Reviewed-by: default avatarGarvin Hicking <gh@faktor-e.de>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristophe Monard <contact@cmonard.fr>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarChristophe Monard <contact@cmonard.fr>
Reviewed-by: default avatarDeveloper Archriss <typo3@archriss.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarGarvin Hicking <gh@faktor-e.de>
Tested-by: default avatarDeveloper Archriss <typo3@archriss.com>
parent 6707f50b
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