#110254Avoid deprecated Doctrine DBAL identifier quoting API
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.
Reviews 6
- 13.4 96067[TASK] Un-mark Connection::quoteIdentifier() override as deprecated
- 14.3 96066[TASK] Un-mark Connection::quoteIdentifier() override as deprecated
- main 95957[TASK] Un-mark Connection::quoteIdentifier() override as deprecated
- 13.4 94889[TASK] Avoid deprecated Doctrine DBAL identifier quoting
- 14.3 94888[TASK] Avoid deprecated Doctrine DBAL identifier quoting
- main 94869[TASK] Avoid deprecated Doctrine DBAL identifier quoting