Review main Merged

95041[TASK] Add FileReference->process()

Benni Mack CR +2 V +2 Normal +44 −27 updated 08/01/26, 06:09

Commit message

Processing a file reference required callers to unwrap the original
file first, since process() only existed on File. Three places in
the core carried the same is_callable() dance: ImageService,
FileDumpController and ThumbnailViewHelper.

FileReference->process() is added as a thin delegation to the
original file, so callers can process an image object without
knowing which of the two types they are holding.

ImageService and FileDumpController drop their manual unwrapping.
ThumbnailViewHelper keeps it: there the unwrapping doubles as the
selection of the metadata source for the alt and title attributes,
which is a separate concern.

ImageService->applyProcessingInstructions() and ->getImage() now
declare File|FileReference instead of FileInterface. Both only ever
worked with these two types and threw for everything else, so this
merely turns a fatal error into a type error. The same applies to
the image branches of the f:media and f:image.srcset ViewHelpers.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Oliver Klee +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 8

Review log 67

  1. Benni Mack uploaded patch set 1 07/31/26, 20:10

  2. core-ci voted on patch set 1 V +1 07/31/26, 20:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105760

  3. Garvin Hicking voted on patch set 1 CR +1 V +1 07/31/26, 20:34

  4. Oliver Klee voted on patch set 1 V +1 07/31/26, 20:39

  5. Georg Ringer voted on patch set 1 CR +1 V +1 08/01/26, 05:38

  6. Benni Mack voted on patch set 1 CR +2 V +2 08/01/26, 06:09

  7. Benni Mack merged patch set 2 08/01/26, 06:09