Review main Ready for review

98363[FEATURE] Provide soft references as value objects

Benni Mack CR 0 V 0 Hard +476 −60 updated 12/05/26, 22:01

Commit message

Soft reference parsers return their matches as nested arrays, whose
shape is documented in a class comment only. Every consumer has to
know the keys, and the "type" of a substitution is checked against
strings all over the place.

SoftReferenceParserResult now provides the matches as SoftReference
objects with an optional SoftReferenceSubstitution, which references
a record or is a plain value (SoftReferenceTargetType). Parsers create
the result from these objects with fromSoftReferences(), consumers
read them with getSoftReferences(). Results created from arrays are
converted, getMatchedElements() still returns the arrays.

The email, URL, substitute and extension path parsers create value
objects, and the reference index creates its rows from them. The
array representation of ReferenceIndex::getRelations() stays as it
is, since ext:impexp writes it into export files.
Show more Show less
Resolves: #111730
Related: #107184
Releases: main
Change-Id: I7055ff7dab629561bf0920f32314067ab574c992

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 3
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/63/98363/3 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/63/98363/3 && 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. 98380[TASK] Deprecate the array representation of soft references Based on this change Benni Mack → main Hard +205 −77 CR 0 V 0 Merge conflict
  2. 98379[FEATURE] Select linkvalidator linktypes by the link type Based on this change Benni Mack → main Hard +252 −26 CR 0 V 0
  3. 98378[TASK] Replace soft reference tokens in one place Based on this change Benni Mack → main Normal +149 −14 CR 0 V 0
  4. 98377[FEATURE] Provide soft references in AppendLinkHandlerElementsEvent Based on this change Benni Mack → main Hard +283 −142 CR 0 V 0 Merge conflict
  5. 98363 [FEATURE] Provide soft references as value objects This change

Merge conflicts 3

Issues 2

Files 11

Review log 36

  1. Benni Mack uploaded patch set 1 12/05/26, 12:51

  2. core-ci voted on patch set 1 V +1 12/05/26, 13:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/116451

  3. Benni Mack rebased onto patch set 2 12/05/26, 19:50

    Copied Votes: * Verified+1 (copy condition: "**changekind:NO_CHANGE**")
  4. core-ci voted on patch set 2 V +1 12/05/26, 19:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/116468

  5. Benni Mack uploaded patch set 3 V +1 12/05/26, 21:50

  6. core-ci voted on patch set 3 V +1 12/05/26, 22:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/116474