Review main Merged

95070[TASK] Resolve file sources in ResourceFactory

Benni Mack CR +2 V +2 Hard +219 −91 updated 08/06/26, 22:00

Commit message

Turning a loosely typed image source - as supplied by a Fluid
template - into a File or FileReference lived in Extbase's
ImageService, even though nothing about it is Extbase specific.

ResourceFactory->resolveFileObject() takes over: it passes through
File and FileReference, unwraps domain objects via
getOriginalResource(), and resolves UIDs, combined identifiers,
"EXT:" paths, legacy storage-0 paths and "t3://file" URNs. In
contrast to retrieveFileOrFolderObject() it never returns a folder
and throws instead of returning null, which is what the callers
need.

"t3://file" is link syntax, so the LinkService is now injected into
the ResourceFactory to resolve it. This does not introduce a
circular service dependency: LinkService only requires an event
dispatcher, and none of the registered link handlers declares a
constructor. Note that a third party link handler injecting the
ResourceFactory would recurse.

f:image, f:uri.image and the backend ThumbnailViewHelper use the
factory directly now, so no image ViewHelper depends on
ImageService anymore. ImageService->getImage() delegates and the
service is down to a single constructor argument.

The backend "../" prefix stripping is dropped along the way. It
compensated for links relative to the /typo3/ directory, which
does not exist since v13.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Simon Praetorius +1
    • Matthias Vogel +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Oliver Klee +1
    • Simon Praetorius +1
    • Matthias Vogel +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 89

  1. Benni Mack uploaded patch set 1 08/03/26, 05:25

  2. core-ci voted on patch set 1 V +1 08/03/26, 05:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105869

  3. Oliver Klee voted on patch set 1 V +1 08/04/26, 11:33

  4. Matthias Vogel voted on patch set 1 CR +1 08/06/26, 19:48

  5. Matthias Vogel voted on patch set 1 V +1 08/06/26, 21:09

  6. Simon Praetorius voted on patch set 1 CR +1 V +1 08/06/26, 21:43

  7. Georg Ringer voted on patch set 1 CR +1 V +1 08/06/26, 21:52

  8. Benni Mack voted on patch set 1 CR +2 V +2 08/06/26, 22:00

  9. Benni Mack merged patch set 2 08/06/26, 22:00