#106989Doctrine DBAL DSN/URL support for database connections is missing
Description
In TYPO3 12, it was possible to configure the database connection using a DSN URL in LocalConfiguration.php, like so:
'DB' => [
'Connections' => [
'Default' => [
'url' => 'mysqli://user:password@host:3306/database',
],
],
],
This functionality appears to be broken in TYPO3 13. When using a DSN URL, the connection parameters are not parsed, leading to a connection failure. This is a regression from TYPO3 12.
The issue stems from the deprecation and subsequent removal of automatic DSN URL parsing within Doctrine DBAL itself. As of Doctrine DBAL 3, the url connection parameter is deprecated, and direct support was removed in a later version. The recommended approach is to use the Doctrine\DBAL\Tools\DsnParser to parse the URL before establishing the connection.
TYPO3 Core’s ConnectionPool::getConnectionByName() method currently does not perform this parsing step, which causes the connection parameters to remain empty if only a URL is provided.
Proposed Solution:
A simple fix can be implemented in TYPO3\CMS\Core\Database\ConnectionPool::getConnectionParams(). By adding a check for the url parameter and using the DsnParser, backwards compatibility can be restored.
This issue was briefly discussed with TYPO3 Core Merger Stefan Bürk, who pointed out the deprecation in Doctrine DBAL. The deprecation notice from Doctrine is as follows:
Deprecation::trigger(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/5843',
'The "url" connection parameter is deprecated. Please use %s to parse a database url before calling %s.',
DsnParser::class,
self::class,
);Reviews 5
- 13.4 94861[BUGFIX] Blind "DB/Connections/Default/url" in TYPO3 BE
- 14.3 94860[BUGFIX] Blind "DB/Connections/Default/url" in TYPO3 BE
- main 94846[BUGFIX] Blind "DB/Connections/Default/url" in TYPO3 BE
- 13.4 89926[BUGFIX] Restore DBAL DSN URL support in ConnectionPool
- main 89923[BUGFIX] Restore DBAL DSN URL support in ConnectionPool
Related issues 1
History 912
-
Thomas Maroschik changed description 06/26/25, 18:16
-
Benjamin Franzke commented and changed status
NewRejected 06/26/25, 18:18 -
Thomas Maroschik changed description 06/26/25, 18:29
-
Benjamin Franzke commented and changed description status
RejectedNew 06/26/25, 18:29nvm, just kidding.
-
Thomas Maroschik changed description 06/26/25, 18:30
-
Gerrit Code Review pushed patch set 1 for main to change 89923 status
NewUnder Review 06/26/25, 18:43 -
Thomas Maroschik commented 06/26/25, 18:47
I like your love language, Benjamin ;)
-
Gerrit Code Review pushed patch set 2 for main to change 89923 06/26/25, 19:12
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 89926 06/26/25, 20:00
-
Thomas Maroschik commented and changed status
Under ReviewResolved done0 %100 % 06/26/25, 20:15Applied in changeset commit:531bdd87e6e1c40b44a8cb90ef2e4f4446ecb136.
-
Benni Mack changed status
ResolvedClosed 12/02/25, 14:37 -
Mathias Brodala changed Related to #110235 07/20/26, 10:24
Rejected because the description of this ticket has been AI generated.