Review main Work in progress Stale

91026[WIP][BUGFIX] Let custom `TypeInterface` handle convertion on their own

Stefan Bürk CR 0 V 0 Easy +5 −4 updated 05/28/26, 14:40

Commit message

The extbase `DataMapper` converts all objects being iterable into a
comma sperarated value list prior handling `TypeInterface` classes,
literally taking away the control for these types to determine how
they may be converted for persiting to the database.

In general it is possible to implement custom types using the TYPO3
`TypeInterface` to implement json field handling since ages along
with `TEXT` fields in the database and implement `json_decode()` in
the constructor and `json_encode()` in the mantandory `__toString()`
method, which works and is done in real live projects even for older
TYPO3 versions (v6, v7, v8, v9, v10, v11, ...).

The only pitfall here is, that it is not possible to provide a type
implementation implementing `\Iterator`, `IteratorAggregate` because
they are iterable and enforced converted to comma-separated csv-like
list string representation. This thinking is based on the assumption
that any object property type **must** be a relation and holds only
the id values. Similar thinking has lead to declearing these kind of
property as `HAS_ONE` relation types for the ClassSchema handling,
something which has been addressed with [1].

[1] https://review.typo3.org/c/Packages/TYPO3.CMS/+/91004

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 4
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/26/91026/4 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/26/91026/4 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Relation chain 5

  1. main 90978[WIP][POC] extbase json support Based on this change Work in progress Stefan Bürk CR 0 V -1 Expert +1649 −1
  2. 91026 [WIP][BUGFIX] Let custom `TypeInterface` handle convertion on their own This change

  3. main 91004[WIP][BUGFIX] Avoid assuming custom property type is a relation This change is based on it Abandoned Stefan Bürk CR 0 V 0 → 14.3, 13.4 Easy +21 −2
  4. main 94190[WIP][BUGFIX] Restrict DataHandler json encoding only to TCAtype=json This change is based on it Work in progress Stefan Bürk CR 0 V 0 → 14.3, 13.4 Easy +34 −2
  5. main 89293[BUGFIX] Honor parameter types in writable Connection methods This change is based on it Merged Stefan Bürk CR +2 V +2 → 14.3 Hard +385 −22

    The chain has patch set 31 of 40, the changes above it need a rebase.

Merge conflicts 3

Files 1

Review log 59

  1. Stefan Bürk uploaded patch set 1 10/13/25, 10:25

  2. Stefan Bürk marked it work in progress 10/13/25, 10:26

  3. core-ci voted on patch set 1 V +1 10/13/25, 10:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86533

  4. Stefan Bürk rebased onto patch set 2 V +1 10/16/25, 07:45

  5. core-ci voted on patch set 2 V +1 10/16/25, 08:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86792

  6. Stefan Bürk rebased onto patch set 3 V +1 11/10/25, 12:30

  7. core-ci voted on patch set 3 V +1 11/10/25, 12:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88845

  8. Stefan Bürk rebased onto patch set 4 V +1 05/28/26, 14:01

  9. core-ci voted on patch set 4 V +1 05/28/26, 14:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102549