Review main Merged

76232[BUGFIX] Ensure table renaming works due doctrine/dbal behaviour change

Stefan Bürk CR +2 V +2 Easy +23 −1 updated 10/24/22, 11:42

Commit message

doctrine/dbal is working on deprecating and changing code and
behaviour in 3.x as preparation for removal in 4.x. Starting
with doctrine/dbal v3.5.0, the table rename detection in the
TYPO3 database compare no longer works as expected. TableDiff
got an `isEmpty()` check, which is used in SchemaDiff and thus
filtering out "renamed" tables without further changes, leading
to a change of behavior. doctrine/dbal favors renaming table
no longer by setting a new name in the TableDiff, thus not having
the changed name in the `isEmpty()` check.

See: https://github.com/doctrine/dbal/pull/5770

doctrine/dbal deprecations and changes require systematical
adoption to cover all the changes. This takes time and proper
testing, which is out of the scope for this change.

This change overrides the `TableDiff->isEmpty()` method in the
corresponding core fascade class, adding checks for $newName
and $tableOptions checks as a intermediate workaround. Thus
keep compatibillity between doctrine/dbal <3.5 and 3.5 for now.

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 1

Files 2