Review main Ready for review

98076[FEATURE] Serialize link arguments from #[UriArgument] properties

Alexander Schnitzler CR 0 V 0 Expert +2125 −4 updated 11/26/26, 15:27

Commit message

Extbase links can carry demand or filter objects that are not
entities. Until now only subclasses of AbstractValueObject were
serialized, with all their properties: internal state ended up in
the link, backed enums and DateTime values could not be mapped back,
cycles exhausted the memory, and the controller had to allow all
properties, so a visitor could set any property with a setter.

The new property attribute #[UriArgument] marks the properties that
belong into a link. The UriBuilder serializes only these: scalars,
backed enums by value, entities by uid, dates in W3C format, nested
objects with marked properties and iterables of these. Other values
and nested objects of a class that is already on the path throw an
exception naming the class and the property. An entity with a uid is
still linked by its uid.

Inbound, the ActionController derives the property mapping
configuration of each argument from the same attribute, so following
such a link needs no configuration in the controller. Configuration
in initializeAction() or initialize<Action>Action() still wins. The
trusted properties of a submitted form apply to the arguments the
form contains; arguments appended to the action URI of a form are
derived from the attribute. Both never merge, so a form-bound entity
cannot gain writable properties the form did not contain.

The serialization of AbstractValueObject is left unchanged and will
be deprecated separately.
Show more Show less

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 1
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/76/98076/1 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/76/98076/1 && git cherry-pick FETCH_HEAD

Review

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

Merge conflicts 8

Issues 1

Files 23

Show 3 more files Show less

Review log 34

  1. Alexander Schnitzler uploaded patch set 1 11/26/26, 14:59

  2. Alexander Schnitzler wrote 11/26/26, 15:06

    Topic set to extbase
  3. core-ci voted on patch set 1 V +1 11/26/26, 15:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115581

  4. Alexander Schnitzler commented on patch set 1 11/26/26, 15:27