Confirmation¶
Confirmed - only related to TYPO3 v12 / Doctrine DBAL 3.
Analysis¶
This is related to the Doctrine DBAL 3.x upgrade in TYPO3 v12,
which is a intermediate release from the Doctrine Team and marks
the Deprecation/Preparation "Major" version between v2 and v4.
The result is, that the Doctrine DBAL 3.x contains some quirks
and deprecation, with dual code branch execution and doublings.
Related to this issue are the extended classes required for the
TYPO3 Database Analyzer workflow.
\TYPO3\CMS\Core\Database\Schema\Comparator
extends the DBAL
\Doctrine\DBAL\Schema\Comparator
, and Doctrine DBAL changed
the inner parts of the comparator. The `diffColumn()` is marked
as deprecated and vanish with Doctrine DBAL 4, which will be
superseeded by the `columnsEqual()` dispatcher method, which
calls the `AbstractPlatform->columnsEqual()` method, if the
platform is set in the comparator.
Comparator instance creation without a platform is deprecated,
but has been allowed in the past. Due to the deprecation layer
for `compareSchemas()` and static -> non-static deprecation
move the platform is not passed down to the inner comparator
and checks pased on the platform are not executed.
That means, that the length check is not properly done due in
the overriden diffColumn()
method, but passing the platform
through would dispatch the columsEqual()
method which does the
comparison in other ways and leading to some noise, which can't
be properly handled in a bugfix safe way (and is still a open
issue for Doctrine DBAL 4 and TYPO3 v13).
However, this issue relates to an oversight and missing the
not available platform during the static to non-static compat
layer.
Possible fix(es)¶
Only possible way to fix this as a v12 bugfix I can see would
be:
- pass the platform to the
compareSchemas()
call in the core
ConnectionMigratior::buildSchemaDiff()
method as 3rd param
and use it for the new self()
to pass the platform to the
constructor
- add a
columnsEqual()
method override to the extended
Comparator class and adding a check against diffColumn()
instead of using the AbstractPlatform::columnsEqual()
method for now and adopt the current workaround from v13.
That means that hidden database changes could popup after
the fix, leading to datbase changes - albeit being considerable
not breaking.
With that, TINYTEXT <-> TEXT <-> MEDIAUMTEXT <-> LONGTEXT changes
are regonized again and can be applied.