From 23b4504f2fa4f59b01bbd25c8ebfdb3ac8d540d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BCrk?= Date: Tue, 11 Nov 2025 17:32:25 +0100 Subject: [PATCH] [BUGFIX] Use old behaviour in DataSet for TYPO3 v12 Recenently added change to `DataSet->import()` has been developed with changes in the TYPO3 connection not backported to TYPO3 v12 and failing now in v12, where in TYPO3 v13 it works. This change reverts the change for TYPO3 v12 while keeping it for TYPO3 v13 as preparation for bugfix required in TYPO3 main(v14) and v13. Releases: 8 --- Classes/Core/Functional/Framework/DataHandling/DataSet.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/Core/Functional/Framework/DataHandling/DataSet.php b/Classes/Core/Functional/Framework/DataHandling/DataSet.php index c6ee20e4..7416fc71 100644 --- a/Classes/Core/Functional/Framework/DataHandling/DataSet.php +++ b/Classes/Core/Functional/Framework/DataHandling/DataSet.php @@ -19,6 +19,7 @@ use Doctrine\DBAL\Types\JsonType; use TYPO3\CMS\Core\Database\ConnectionPool; +use TYPO3\CMS\Core\Information\Typo3Version; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\TestingFramework\Core\Testbase; @@ -79,7 +80,8 @@ public static function import(string $path): void // types correctly (like Connection::PARAM_LOB) allows doctrine to create valid SQL $types = []; foreach ($element as $columnName => $columnValue) { - $types[$columnName] = $columnType = $tableDetails->getColumn($columnName)->getType(); + $columnType = $tableDetails->getColumn($columnName)->getType(); + $types[$columnName] = (new Typo3Version())->getMajorVersion() > 12 ? $columnType : $columnType->getBindingType(); // JSON-Field data is converted (json-encode'd) within $connection->insert(), and since json field // data can only be provided json encoded in the csv dataset files, we need to decode them here. if ($element[$columnName] !== null