Review main Merged

95446[TASK] Cover file collection sorting with an enum

Elias Häußler CR +2 V +2 Normal +108 −17 updated 09/02/26, 12:05

Commit message

The sorting direction in `FileCollector::sort()` can receive three kind
of sorting strategies – "ascending", "descending", and "random". Since
these are fixed keywords, they can be easily transformed to a dedicated
enum. For this, a new `FileCollectionSorting` enum is introduced, which
is solely used in this specific case, but might be extended to further
areas later. The enum supports both short (e.g. "asc") and long (e.g.
"ascending") keywords and resolves them properly to the underlying enum
cases, while ignoring case-sensitivity.

Review

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

Issues 1

Files 5

Review log 911

  1. Elias Häußler uploaded patch set 1 08/27/26, 07:48

  2. Mathias Brodala commented on patch set 1 CR -1 08/27/26, 07:54

    FileCollector.php:191

    This is a breaking change. Legacy "string" values must also be accepted and normalized accordingly.
  3. core-ci voted on patch set 1 V +1 08/27/26, 07:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107223

  4. Elias Häußler commented on patch set 1 08/27/26, 07:57

    FileCollector.php:191 Reply

    Even if the class is marked as `@internal`?
  5. Mathias Brodala commented on patch set 1 CR 0 08/27/26, 07:59

    FileCollector.php:191 Reply

    You are right, in this case the change is acceptable. Still I'd vote for an Important RST to raise a notice for people directly using this.
  6. Georg Ringer voted on patch set 1 CR +1 V +1 09/02/26, 09:26

  7. Georg Ringer uploaded patch set 2 CR +1 V +1 09/02/26, 11:53

  8. Georg Ringer voted on patch set 2 CR +1 V +1 09/02/26, 11:53

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

  10. Benni Mack commented on patch set 2 CR +2 V +2 09/02/26, 12:04

    FileCollector.php:191 Reply

    Done
  11. Benni Mack merged patch set 3 09/02/26, 12:05