Deprecation: #105297 - tableoptions and collate connection configuration

See forge#105297

Description

The possibility to configure default table options like charset and collation for the database analyzer has been introduced using the array $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['tableoptions'] with sub-array keys charset and collate. These were only used for MySQL and MariaDB connections.

Since TYPO3 v11 the tableoptions keys were silently migrated to defaultTableOptions, which is the proper Doctrine DBAL connection option for for MariaDB and MySQL.

Furthermore, Doctrine DBAL 3.x switched from using they array key collate to collation, ignoring the old array key with Doctrine DBAL 4.x. This was silently migrated by TYPO3, too.

These options and migration are now deprecated in favor of using the final array keys and will be removed with TYPO3 v15 (or later) as breaking change.

Impact

Instances using the database connection options in $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['tableoptions'] array, or using the collate key will trigger a E_USER_DEPRECATED notification.

Affected installations

All instances using the mentioned options.

Migration

Review settings.php and additional.php and adapt the deprecated configuration by renaming affected array keys.

# before
'DB' => [
    'Connections' => [
        'Default' => [
            'tableoptions' => [
                'collate' => 'utf8mb4_unicode_ci',
            ],
        ],
    ],
],

# after
'DB' => [
    'Connections' => [
        'Default' => [
            'defaultTableOptions' => [
                'collation' => 'utf8mb4_unicode_ci',
            ],
        ],
    ],
],
Copied!