Skip to content

Commit 70c267b

Browse files
committed
[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
1 parent 86f18aa commit 70c267b

File tree

1 file changed

+3
-1
lines changed
  • Classes/Core/Functional/Framework/DataHandling

1 file changed

+3
-1
lines changed

Classes/Core/Functional/Framework/DataHandling/DataSet.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
use Doctrine\DBAL\Types\JsonType;
2121
use TYPO3\CMS\Core\Database\ConnectionPool;
22+
use TYPO3\CMS\Core\Information\Typo3Version;
2223
use TYPO3\CMS\Core\Utility\GeneralUtility;
2324
use TYPO3\TestingFramework\Core\Testbase;
2425

@@ -79,7 +80,8 @@ public static function import(string $path): void
7980
// types correctly (like Connection::PARAM_LOB) allows doctrine to create valid SQL
8081
$types = [];
8182
foreach ($element as $columnName => $columnValue) {
82-
$types[$columnName] = $columnType = $tableDetails->getColumn($columnName)->getType();
83+
$columnType = $tableDetails->getColumn($columnName)->getType();
84+
$types[$columnName] = (new Typo3Version())->getMajorVersion() > 12 ? $columnType : $columnType->getBindingType();
8385
// JSON-Field data is converted (json-encode'd) within $connection->insert(), and since json field
8486
// data can only be provided json encoded in the csv dataset files, we need to decode them here.
8587
if ($element[$columnName] !== null

0 commit comments

Comments
 (0)