Repository navigation
Conversation
Snapshot rows already contain database values. Exporting a Doctrine JSON type causes the raw JSON string to be encoded again during restoration, changing objects and arrays into strings. Other types can likewise receive values already converted by the database. Use the string type for columns whose binding type is STRING so restoration preserves their stored representation. Keep the existing handling for other binding types. Cover JSON, datetime and text conversion in the unit suite and verify an export/import round trip, including JSON scalars and SQL NULL. Document running the functional regressions through a Core checkout. Releases: main
Avoid constructing default query restrictions, which require TCA schema services on TYPO3 14.3. The snapshot regression only needs a restriction container that accepts removing all restrictions.
CybotTM
approved these changes
Nov 15, 2026
CybotTM
left a comment
There was a problem hiding this comment.
I tested the fix on TYPO3 Core main. The change to DatabaseAccessor does what it should. The new functional test fails without the fix and passes with it on SQLite, PostgreSQL, MariaDB and MySQL. Without the fix, only the JSON column differs: the restore encodes every value a second time, so 42 becomes "42".
I approve. These points are suggestions:
- Unit test: keep only the JSON case. The
plain textcase passes with and without the fix. Thedatabase datetimecase fails without the fix only because a unit test uses the DoctrineDateTimeType. In a TYPO3 run,ConnectionPoolreplacesdatetimewith the TYPO3DateTimeType, which keeps strings unchanged. The functional test shows the same result: thecreated_atcolumn comes back unchanged onmaintoo. - Description: the sentence "Other types can likewise receive values already converted" is not true for
datetimein TYPO3. CONTRIBUTING.rst also asks for an issue link, steps to reproduce and the results of the Core test runs. - Backport to branch 9: branch 9 has the same
lookupName()andbulkInsert()code. TYPO3 13.4 requires^9.2.1and TYPO3 14.3 requires^9.7.0. Recent bugfixes, for example 480a74d, went tomain, 9. - CI: the CI of this repository does not run the functional test, because
ci.ymlruns only-s unit. A manual step is acceptable, but please state it in the description.
CybotTM
reviewed
Nov 15, 2026
CybotTM
left a comment
There was a problem hiding this comment.
Follow-up to my review above. If you prefer to keep all three unit test cases, use the inline suggestion below instead of my earlier suggestion to delete two of them.
Assert the exported column types and raw values directly instead of performing Doctrine conversions in the unit test. Cover JSON, datetime and text as string-bound types and retain an integer control case. Document that DatabaseAccessor regression tests also run on SQLite; they do not require DatabaseSnapshot's server-database code path.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Snapshot rows already contain database values. Exporting a Doctrine JSON type causes the raw JSON string to be encoded again during restoration, changing objects and arrays into strings. Other types can likewise receive values already converted by the database.
Use the string type for columns whose binding type is STRING so restoration preserves their stored representation. Keep the existing handling for other binding types.
Cover JSON, datetime and text conversion in the unit suite and verify an export/import round trip, including JSON scalars and SQL NULL. Document running the functional regressions through a Core checkout.