Task #102959
closedUpgrade to `doctrine/dbal:4.0.0-RC2`
100%
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.
Updated by Stefan Bürk 10 months ago
- Related to Task #102875: Require doctrine/dbal 4.x added
Updated by Gerrit Code Review 10 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
Updated by Stefan Bürk 10 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 3b563e58bf17bd46eb7b0ea79cfa617bea0f3d5e.
Updated by Rafael Kähm 6 months 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];
}
}
}
Updated by Stefan Bürk 6 months 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#L220How to reproduce:¶
Try to run
typo3 setup
command with definedTYPO3_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.