Issue Epic New Stale

#110253Prepare database abstraction layer for Doctrine DBAL 5.x

Stefan Bürk 07/21/26, 18:00 updated 08/02/26, 12:15

Description

doctrine/dbal 4.3 and 4.4 deprecated a large part of the schema object and
schema manager API that TYPO3 builds upon. main, 14.3 and 13.4 all use
doctrine/dbal ~4.4.3, so the deprecation surface is identical on all three
branches.

Nothing is currently visible: doctrine/deprecations defaults to “none” and
TYPO3 never enables it. This is forward-compatibility work for DBAL 5.x, not
an active defect.

An audit identified three items that are not part of the upstream deprecation
list but dominate the effort:

1. The new introspect*() API bypasses the protected _getPortable*() hooks
entirely. Introspection now runs through IntrospectingSchemaProvider and the
per-platform MetadataProvider implementations, both final/internal. TYPO3
carries six _getPortable* overrides (Doctrine type from column comment,
MySQL default value unescaping, MySQL index prefix lengths). Migrating
naively drops that behaviour silently and persists wrong column metadata in
the “database_schema” cache.

2. TYPO3\CMS\Core\Database\Schema\TableDiff extends the Doctrine class but
deliberately does not call parent::__construct(). The inherited
getDroppedForeignKeyConstraintNames() reads Doctrine’s uninitialised private
property and raises an Error. Dormant today, but it is the method DBAL 5
switches to.

3. Two places rely on the array keys of Table::getIndexes() and
Table::getForeignKeys() being names. Those become lists in DBAL 5, turning
an overwrite into an append (duplicate indexes and foreign keys).

Related to #106495, which deferred exactly this scope.

Work is split into child issues. Behaviour-preserving changes are backported to
14.3 and 13.4; anything that changes generated DDL, diff content or public API
stays on main.

There are possible more to come in the future.

[1] https://github.com/doctrine/dbal/blob/4.4.x/UPGRADE.md

Reviews 15

Fix this issue

Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". The changes above were merged or abandoned: read them before you start. How to create a patch

Commit message
[TASK] Prepare database abstraction layer for Doctrine DBAL 5.x Resolves: #110253 Releases: main

Subtasks 5