Project

General

Profile

Actions

Task #102959

closed

Upgrade to `doctrine/dbal:4.0.0-RC2`

Added by Stefan Bürk 4 months ago. Updated 5 days ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2024-01-27
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Doctrine DBAL has been upgraded to the next
major version using the development version
as a intermediate solution. Recently, the
second release candidate has been released.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #102875: Require doctrine/dbal 4.xClosedStefan Bürk2024-01-19

Actions
Actions #1

Updated by Stefan Bürk 4 months ago

Actions #2

Updated by Gerrit Code Review 4 months ago

  • Status changed from New to Under Review

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82674

Actions #3

Updated by Stefan Bürk 4 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Benni Mack 4 months ago

  • Status changed from Resolved to Closed
Actions #5

Updated by Rafael Kähm 6 days ago

There is a trouble within \TYPO3\CMS\Install\Service\SetupDatabaseService::getDatabaseConfigurationFromEnvironment() method.
The port is not casted to int after fetching it from ENV. See: https://github.com/TYPO3/typo3/blob/90e286e56eb55a1e0f5888b0f8f65917d97eedf4/typo3/sysext/install/Classes/Service/SetupDatabaseService.php#L220

How to reproduce:

Try to run typo3 setup command with defined TYPO3_INSTALL_DB_* variables.


Proposed fix:

public function getDatabaseConfigurationFromEnvironment(): array
    {
        /** @var Params $envCredentials */
        $envCredentials = [];
        foreach (['driver', 'host', 'user', 'password', 'port', 'dbname', 'unix_socket'] as $value) {
            $envVar = 'TYPO3_INSTALL_DB_' . strtoupper($value);
            if (getenv($envVar) !== false) {
                $envCredentials[$value] = getenv($envVar);
                if($value === 'port') {
                    $envCredentials[$value] = (int)$envCredentials[$value];
                }
            }
        }
Actions #6

Updated by Stefan Bürk 5 days ago

Rafael Kähm wrote in #note-5:

There is a trouble within \TYPO3\CMS\Install\Service\SetupDatabaseService::getDatabaseConfigurationFromEnvironment() method.
The port is not casted to int after fetching it from ENV. See: https://github.com/TYPO3/typo3/blob/90e286e56eb55a1e0f5888b0f8f65917d97eedf4/typo3/sysext/install/Classes/Service/SetupDatabaseService.php#L220

How to reproduce:

Try to run typo3 setup command with defined TYPO3_INSTALL_DB_* variables.


Proposed fix:

[...]

@Rafael Kähm this should be fixed with

84231: [BUGFIX] Cast port to integer when setting up the database | https://review.typo3.org/c/Packages/TYPO3.CMS/+/84231

in main and 12.4. That means, that you need to wait for the next 13 sprint release or use composer patches to fix that.

Actions

Also available in: Atom PDF