[TASK] Force string values in impexp exports 40/57140/9
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 7 Jun 2018 13:34:59 +0000 (15:34 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 7 Jun 2018 15:58:11 +0000 (17:58 +0200)
commit7332e5bfed79c0f5f3ff78b1cc1e85ca9ce55c58
tree223b4458fb078e0ce9fd5c9a731a907acf67ba0d
parent7b2319ffee9766fe8b459a69bf641711d8655ec1
[TASK] Force string values in impexp exports

Method BackendUtility::getRecord() returns strings or integer
values for number columns like int / bigint. This detail depends
on the underlying driver, for instance mysqli returns integers
for those fields, while native pdo_mysql and our pdo_pgsql setup
return strings for everything.

This leads to different xml files when exporting records depending
on driver, since GeneralUtility::array2xml() may add type="integer".
That's especially nasty for the functional export tests and is one
reason we have to maintain dedicated xml fixture files per db driver.

During import, the type value does not matter, it needs to be able
to cope with both variants anyway.

The patch now just forces strings for all to-be-exported row values.

Resolves: #85175
Releases: master
Change-Id: Ic132d8abd906b34c59279ce025c0bdd65e954672
Reviewed-on: https://review.typo3.org/57140
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
41 files changed:
typo3/sysext/core/Tests/Functional/DataHandling/FlexformIrre/DataSet/LiveDefaultElements.csv
typo3/sysext/impexp/Classes/Export.php
typo3/sysext/impexp/Tests/Functional/AbstractImportExportTestCase.php
typo3/sysext/impexp/Tests/Functional/Export/GroupFileAndFileReferenceItemInFlexFormTest.php
typo3/sysext/impexp/Tests/Functional/Export/GroupFileAndFileReferenceItemTest.php
typo3/sysext/impexp/Tests/Functional/Export/IrreTutorialRecordsTest.php
typo3/sysext/impexp/Tests/Functional/Export/PagesAndTtContentTest.php
typo3/sysext/impexp/Tests/Functional/Export/PagesAndTtContentWithImagesTest.php
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mssql/impexp-group-file-and-file_reference-item-but-images-not-included.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mssql/impexp-group-file-and-file_reference-item-in-ff.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mssql/impexp-group-file-and-file_reference-item.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mssql/irre-records.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mssql/pages-and-ttcontent-with-corrupt-image.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mssql/pages-and-ttcontent-with-image-but-not-included.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mssql/pages-and-ttcontent-with-image.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mssql/pages-and-ttcontent.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mysql/impexp-group-file-and-file_reference-item-but-images-not-included.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mysql/impexp-group-file-and-file_reference-item-in-ff.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mysql/impexp-group-file-and-file_reference-item.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mysql/irre-records.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mysql/pages-and-ttcontent-with-corrupt-image.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mysql/pages-and-ttcontent-with-image-but-not-included.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mysql/pages-and-ttcontent-with-image.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/mysql/pages-and-ttcontent.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/postgresql/impexp-group-file-and-file_reference-item-but-images-not-included.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/postgresql/impexp-group-file-and-file_reference-item-in-ff.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/postgresql/impexp-group-file-and-file_reference-item.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/postgresql/irre-records.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/postgresql/pages-and-ttcontent-with-corrupt-image.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/postgresql/pages-and-ttcontent-with-image-but-not-included.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/postgresql/pages-and-ttcontent-with-image.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlExports/postgresql/pages-and-ttcontent.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlImports/impexp-group-file-and-file_reference-item-but-images-not-included.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlImports/impexp-group-file-and-file_reference-item-in-ff.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlImports/impexp-group-file-and-file_reference-item.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlImports/irre-records.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlImports/pages-and-ttcontent-with-image-but-not-included.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlImports/pages-and-ttcontent-with-image.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlImports/pages-and-ttcontent-with-rte-image-n-file-link.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlImports/pages-and-ttcontent-with-two-images.xml
typo3/sysext/impexp/Tests/Functional/Fixtures/XmlImports/pages-and-ttcontent.xml