Issue Bug Closed

#109237getPlatformServerVersion() ignores configured serverVersion parameter

Rico Sonntag 03/13/26, 15:25 updated 04/21/26, 11:30

Description

When a `serverVersion` parameter is configured in the DBAL connection settings (e.g. in `$GLOBALS[‘TYPO3_CONF_VARS’][‘DB’][‘Connections’][‘Default’][‘serverVersion’]`), Doctrine DBAL correctly uses this value for platform detection in `getDatabasePlatform()`.

However, `Connection::getPlatformServerVersion()` in `typo3/cms-core` always calls `$this->getServerVersion()`, which queries the actual server connection (via `mysqli::$server_info`). This means the version displayed in the TYPO3 backend (System Information toolbar, Maintenance module) reflects the server’s handshake value — not the configured one.

This is a problem when using connection proxies like ProxySQL, which report a different `server_version` in the MySQL handshake packet than the actual backend database. Users configure `serverVersion` specifically to override the proxy’s reported version, but the UI still shows the wrong value.

**Steps to reproduce:**
1. Configure a database connection through ProxySQL (or any MySQL proxy)
2. Set `serverVersion` in the connection config to the real MariaDB version (e.g. `10.11.16-MariaDB-ubu2204`)
3. Open the Maintenance module → “Analyze Database Structure“
4. The schema analysis works correctly (uses `serverVersion`), but the displayed database version shows the proxy’s version (e.g. `10.6.0`) instead of the configured `10.11.16-MariaDB-ubu2204`

**Expected behavior:**
`getPlatformServerVersion()` should prefer the configured `serverVersion` parameter over the handshake value, consistent with how `getDatabasePlatform()` already works.

**Fix:**
The fix is a one-line change in `Connection::getPlatformServerVersion()`:

// Before:
$version = trim($this->getServerVersion());

// After:
$params = $this->getParams();
$version = trim($params['serverVersion'] ?? $this->getServerVersion());

Reviews 2

History 29

  1. Rico Sonntag commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-04-11T18:25:10+00:00" > 04/11/26, 18:25 </span>

    Applied in changeset commit:acb401d5d2839a58a5fc14fc992c50d2478acde9.