[TASK] Mitigate deprecated doctrine `SchemaDiff` methods
The doctrine team deprecated the `SchemaDiff->toSql()` and `SchemaDiff->toSaveSql()` methods [1], `toSaveSql()` without a replacement. Both methods are used in the TYPO3 database analyzer build up - and the behaviour of replaceless deprecated `toSaveSql()` is a essential used feature. In the current state there is no good solution to mitigate this, therefore a temporary `getSaveAlterSchemaSQL()` should be added as a wrapper. For now dispatch to the deprecated `SchemaDiff->toSaveSql()` and replace the body with corresponding code during the upgrade for `Doctrine DBAL 4` - marked with a todo comment. The whole schema and connection migrator implementation is scheduled for a refactoring due to needs of further features, so postpone a refactoring now and use this smelly hack. This change ... * adds a trait `PlatformSaveAlterSchemaSQLTrait` providing the `getSaveAlterSchemaSQL()` wrapper method. * adds the trait `PlatformSaveAlterSchemaSQLTrait` to all extended platform classes (#102402). * replaces deprecated `SchemaDiff->toSql()` calls with `AbstractPlatform::getAlterSchemaSQL()`. * replace `SchemaDiff->toSaveSql()` calls with extended platform method `AbstractPlatform::getSaveAlterSchemaSQL()`. [1] https://github.com/doctrine/dbal/blob/3.7.x/UPGRADE.md#deprecated-schemadifftosql-and-schemadifftosavesql Resolves: #102592 Related: #102402 Releases: main Change-Id: I8d9cd7e368ec68e2d5b54ec960d2200342180586 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82076 Tested-by:Stefan Bürk <stefan@buerk.tech> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Oliver Klee <typo3-coding@oliverklee.de> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
Showing
- typo3/sysext/core/Classes/Database/Platform/MariaDB1027Platform.php 1 addition, 0 deletions...xt/core/Classes/Database/Platform/MariaDB1027Platform.php
- typo3/sysext/core/Classes/Database/Platform/MariaDB1043Platform.php 1 addition, 0 deletions...xt/core/Classes/Database/Platform/MariaDB1043Platform.php
- typo3/sysext/core/Classes/Database/Platform/MariaDB1052Platform.php 1 addition, 0 deletions...xt/core/Classes/Database/Platform/MariaDB1052Platform.php
- typo3/sysext/core/Classes/Database/Platform/MariaDBPlatform.php 1 addition, 0 deletions...sysext/core/Classes/Database/Platform/MariaDBPlatform.php
- typo3/sysext/core/Classes/Database/Platform/MySQL57Platform.php 1 addition, 0 deletions...sysext/core/Classes/Database/Platform/MySQL57Platform.php
- typo3/sysext/core/Classes/Database/Platform/MySQL80Platform.php 1 addition, 0 deletions...sysext/core/Classes/Database/Platform/MySQL80Platform.php
- typo3/sysext/core/Classes/Database/Platform/MySQLPlatform.php 1 addition, 0 deletions...3/sysext/core/Classes/Database/Platform/MySQLPlatform.php
- typo3/sysext/core/Classes/Database/Platform/PlatformSaveAlterSchemaSQLTrait.php 56 additions, 0 deletions...ses/Database/Platform/PlatformSaveAlterSchemaSQLTrait.php
- typo3/sysext/core/Classes/Database/Platform/PostgreSQL100Platform.php 2 additions, 0 deletions.../core/Classes/Database/Platform/PostgreSQL100Platform.php
- typo3/sysext/core/Classes/Database/Platform/PostgreSQL94Platform.php 2 additions, 0 deletions...t/core/Classes/Database/Platform/PostgreSQL94Platform.php
- typo3/sysext/core/Classes/Database/Platform/PostgreSQLPlatform.php 2 additions, 0 deletions...ext/core/Classes/Database/Platform/PostgreSQLPlatform.php
- typo3/sysext/core/Classes/Database/Platform/SQLitePlatform.php 2 additions, 0 deletions.../sysext/core/Classes/Database/Platform/SQLitePlatform.php
- typo3/sysext/core/Classes/Database/Schema/ConnectionMigrator.php 19 additions, 15 deletions...ysext/core/Classes/Database/Schema/ConnectionMigrator.php
- typo3/sysext/core/Classes/Database/Schema/SchemaMigrator.php 2 additions, 3 deletionstypo3/sysext/core/Classes/Database/Schema/SchemaMigrator.php
Please register or sign in to comment