Issue Task Resolved

#110254Avoid deprecated Doctrine DBAL identifier quoting API

Stefan Bürk 07/21/26, 18:27 updated 07/22/26, 16:55

Description

Doctrine DBAL 4.4 deprecated both `Doctrine\DBAL\Connection::quoteIdentifier()`
and `Doctrine\DBAL\Platforms\AbstractPlatform::quoteIdentifier()` [1]. Both are
removed with Doctrine DBAL 5.0, and callers are expected to use
`quoteSingleIdentifier()` for each part of a qualified name instead.

`TYPO3\CMS\Core\Database\Connection::quoteIdentifier()` overrides the method to
pass `*` through unchanged and delegates everything else to the deprecated
parent implementation. That parent in turn calls the deprecated platform method,
so a single call emits two deprecations.

This is the most frequently reached deprecated DBAL call in TYPO3, because it is
the funnel for the public quoting API: `QueryBuilder::quoteIdentifier()`,
`Connection::quoteIdentifiers()`, `Connection::quoteColumnValuePairs()` and every
extension calling them end up here.

The parent implementation is replaced by an inlined equivalent: split a qualified
name on `.`, quote each part with
`$this->getDatabasePlatform()->quoteSingleIdentifier()`, and join the parts again.
`quoteSingleIdentifier()` is the method the deprecated implementation used
internally as well, and it is the one platforms override to provide their
delimiting style (backticks for MySQL/MariaDB, brackets for SQL Server, double
quotes elsewhere). No platform overrides `quoteIdentifier()` itself.

The change is therefore behaviour-preserving and backportable.

[1] https://github.com/doctrine/dbal/pull/6590

Reviews 6