Review 14.3 Merged

95064[TASK] Use Doctrine introspection API for table and database names

Stefan Bürk CR +2 V +2 Easy +23 −6 updated 08/02/26, 12:13

Commit message

Doctrine DBAL 4.4 deprecated `listTableNames()` and `listDatabases()`
in favour of `introspectTableNames()` and `introspectDatabaseNames()`,
both are removed with Doctrine DBAL 5.0.

The new methods return name value objects - `OptionallyQualifiedName`
for tables, `UnqualifiedName` for databases - instead of plain
strings. Of the six call sites four only count the result or check it
for emptiness and need no name handling at all. The other two convert
the objects to strings right away, so no Doctrine name object crosses
a TYPO3 method boundary.

`SchemaInformation::listTableNames()` keeps returning `string[]`, and
both the payload and the identifier of its cache entry stay
unchanged, so no cache invalidation is required.

The conversion uses `getValue()` and not `toString()`: the
introspection provider builds the names through
`OptionallyQualifiedName::quoted()`, so `toString()` would render
them with identifier quotes. The PostgreSQL schema qualifier is kept,
both the deprecated and the new path omit the schema when it matches
the current one and prefix `schema.table` otherwise.

Equivalence of old and new result was verified on SQLite, MariaDB,
MySQL and PostgreSQL.

Column and index introspection is not touched by this change.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
  • Verified V +2 Done
    • Stefan Bürk +2
    • core-ci +1 CI

Issues 2

Files 4

Review log 34

  1. Stefan Bürk commented on patch set 1 08/02/26, 11:49

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 08/02/26, 12:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105839

  3. Stefan Bürk voted on patch set 1 CR +2 V +2 08/02/26, 12:13

  4. Stefan Bürk merged patch set 2 08/02/26, 12:13