Review main Merged Breaking

88697[!!!][TASK] Use FileType Enum in FAL

Benni Mack CR +2 V +2 Normal +30 −29 updated 03/24/25, 20:42

Commit message

In TYPO3 v13 with #102032, the getType() and FileType constants
were replaced by a BackedEnum "FileType" which was kept as return
type integer for backwards-compatibility.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Garvin Hicking +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 3

Files 7

Review log 1520

  1. Benni Mack uploaded patch set 1 03/23/25, 22:40

  2. core-ci voted on patch set 1 V -1 03/23/25, 22:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76101

  3. Benni Mack uploaded patch set 2 V -1 03/23/25, 22:56

  4. core-ci voted on patch set 2 V -1 03/23/25, 23:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76103

  5. Benni Mack uploaded patch set 3 V -1 03/23/25, 23:33

  6. core-ci voted on patch set 3 V +1 03/23/25, 23:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76107

  7. Benni Mack updated the commit message in patch set 4 V +1 03/23/25, 23:43

  8. core-ci voted on patch set 4 V +1 03/23/25, 23:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76108

  9. Stefan Bürk voted on patch set 4 CR +1 V +1 03/24/25, 05:48

  10. Garvin Hicking commented on patch set 4 03/24/25, 07:13

    Breaking-105377-DeprecatedFunctionalityRemoved.rst:124

    should FileReference be listed here too? And I couldn't check yet, is an extensionscanner check for this in place to maybe warn with a weak hint at usages of this method?
  11. Christian Kuhn voted on patch set 4 CR +1 V +1 03/24/25, 08:52

  12. Benni Mack uploaded patch set 5 CR +1 V +1 03/24/25, 17:31

  13. Benni Mack commented on patch set 5 03/24/25, 17:31

    Breaking-105377-DeprecatedFunctionalityRemoved.rst:124 Reply

    No Extension Scanner check, because we do not have "Changed Return Type of method" as category yet :)
  14. core-ci voted on patch set 5 V +1 03/24/25, 17:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76159

  15. Stefan Bürk voted on patch set 5 CR +1 V +1 03/24/25, 18:18

  16. Garvin Hicking commented on patch set 5 CR +1 V +1 03/24/25, 18:57

    Breaking-105377-DeprecatedFunctionalityRemoved.rst:124 Reply

    What I meant was scanning just for usages / consumers of `AbstractFile|FileReference|...childrenoftheseClasses->getType()` code access, so any place that just calls that method to report with a weak hit. But it might be too much false positive noise, so nevermind.
  17. Georg Ringer voted on patch set 5 CR +2 V +2 03/24/25, 19:42

  18. Georg Ringer merged patch set 6 03/24/25, 19:42

  19. Benni Mack commented on patch set 6 03/24/25, 19:57

    I wonder if this change is actually cool... because it isn't. Fluid cannot handle Enums properly (yet). Fluids' Type.html looks like this: <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"; data-namespace-typo3-fluid="true"> <f:switch expression="{file.type}"> <f:case value="3"> <f:render partial="Media/Type/Audio" arguments="{file: file, dimensions: dimensions, data: data, settings: settings}" /> </f:case> <f:case value="4"> <f:render partial="Media/Type/Video" arguments="{file: file, dimensions: dimensions, data: data, settings: settings}" /> </f:case> <f:defaultCase> <f:render partial="Media/Type/Image" arguments="{file: file, dimensions: dimensions, data: data, settings: settings}" /> </f:defaultCase> </f:switch> </html> and guess what... it does not work anymore. This means EVERYBODY who uses FileReferences or Files in Fluid now has a borken setup.
  20. Benni Mack wrote 03/24/25, 20:42

    Created a revert of this change as I7c2b813d2cfe212ed801ed85706c7d116835e3a2