Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation: #105297 - tableoptions and collate connection configuration #4329

Open
simonschaufi opened this issue Oct 15, 2024 · 0 comments

Comments

@simonschaufi
Copy link
Collaborator

Deprecation: #105297 - tableoptions and collate connection configuration

https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.4/Deprecation-105297-DeprecateTableoptionsAndCollateConnectionConfiguration.html

Deprecation: #105297 - tableoptions and collate connection configuration

See 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 silent migrations are now deprecated in favor of using the final
array keys.

Note

When migrating, make sure to remove the old tableoptions array key,
otherwise it will take precedence over setting the new
defaultTableOptions key in TYPO3 v13.

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',
            ],
        ],
    ],
],

Database, LocalConfiguration, NotScanned, ext:core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant