-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The Doctrine Team recently released minor version release `4.1.0` including a couple of bugfixes, internal changes and also new features [1]. The aforementioned internal changes introduces breaking stuff within internal implementation, for example the TYPO3 Database Analyzer stack enforcing adoption [2][3][4]. Sadly, it's not possible to provide backwards compatible code and thus minimum version raise is "absolutly" required. Doctrine DBAL 4.1.0 also includes new platform implementation for some database platforms and this change adds them as extend replacements to ensure working state with TYPO3 DB Analyzer. Note that previous TYPO3 v13.x composer instances needs to limit doctrine/dbal to 4.0.x on their own to avoid breaking behaviour. Used command(s): \ composer require --no-update --no-install \ -d typo3/sysext/redirects \ "doctrine/dbal":"^4.1" \ && composer require --no-update --no-install \ -d typo3/sysext/core \ "doctrine/dbal":"^4.1" \ && composer require --no-update --no-install \ -d typo3/sysext/install \ "doctrine/dbal":"^4.1" \ && composer require "doctrine/dbal":"^4.1" [1] https://github.com/doctrine/dbal/releases/tag/4.1.0 [2] doctrine/dbal#6280 [3] doctrine/dbal#6482 [4] doctrine/dbal#6490 Resolves: #104628 Releases: main Change-Id: I53c86feed17abc6a90625e27fb135f606a57fc9f Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/85620 Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Andreas Kienast <a.fernandez@scripting-base.de> Tested-by: core-ci <typo3@b13.com> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Andreas Kienast <a.fernandez@scripting-base.de> Tested-by: Stefan Bürk <stefan@buerk.tech> Reviewed-by: Stefan Bürk <stefan@buerk.tech>
- Loading branch information
Showing
9 changed files
with
212 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
namespace TYPO3\CMS\Core\Database\Platform; | ||
|
||
use Doctrine\DBAL\Platforms\MariaDB1010Platform as DoctrineMariaDB1010Platform; | ||
use Doctrine\DBAL\Schema\TableDiff as DoctrineTableDiff; | ||
use TYPO3\CMS\Core\Database\Schema\TableDiff; | ||
|
||
/** | ||
* doctrine/dbal 4+ removed the old doctrine event system. The new way is to extend the platform | ||
* class(es) and directly override the methods instead of consuming events. Therefore, we need to | ||
* extend the platform classes to provide some changes for TYPO3 database schema operations. | ||
* | ||
* @internal not part of Public Core API. | ||
*/ | ||
class MariaDB1010Platform extends DoctrineMariaDB1010Platform | ||
{ | ||
use MySQLCompatibleAlterTablePlatformAwareTrait; | ||
|
||
/** | ||
* Gets the SQL statements for altering an existing table. | ||
* | ||
* This method returns an array of SQL statements, since some platforms need several statements. | ||
* | ||
* @return list<string> | ||
*/ | ||
public function getAlterTableSQL(TableDiff|DoctrineTableDiff $diff): array | ||
{ | ||
return $this->getCustomAlterTableSQLEngineOptions($this, $diff, parent::getAlterTableSQL($diff)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
namespace TYPO3\CMS\Core\Database\Platform; | ||
|
||
use Doctrine\DBAL\Platforms\MySQL84Platform as DoctrineMySQL84Platform; | ||
use Doctrine\DBAL\Schema\TableDiff as DoctrineTableDiff; | ||
use TYPO3\CMS\Core\Database\Platform\Traits\MySQLDefaultValueDeclarationSQLOverrideTrait; | ||
use TYPO3\CMS\Core\Database\Schema\TableDiff; | ||
|
||
/** | ||
* doctrine/dbal 4+ removed the old doctrine event system. The new way is to extend the platform | ||
* class(es) and directly override the methods instead of consuming events. Therefore, we need to | ||
* extend the platform classes to provide some changes for TYPO3 database schema operations. | ||
* | ||
* @internal not part of Public Core API. | ||
*/ | ||
class MySQL84Platform extends DoctrineMySQL84Platform | ||
{ | ||
use MySQLCompatibleAlterTablePlatformAwareTrait; | ||
use MySQLDefaultValueDeclarationSQLOverrideTrait; | ||
|
||
/** | ||
* Gets the SQL statements for altering an existing table. | ||
* | ||
* This method returns an array of SQL statements, since some platforms need several statements. | ||
* | ||
* @return list<string> | ||
*/ | ||
public function getAlterTableSQL(TableDiff|DoctrineTableDiff $diff): array | ||
{ | ||
return $this->getCustomAlterTableSQLEngineOptions($this, $diff, parent::getAlterTableSQL($diff)); | ||
} | ||
} |
Oops, something went wrong.