Review main Merged

82034[BUGFIX] Support legacy-mode PSR-autoloading for enum type files

Garvin Hicking CR +2 V +2 Easy +2 −2 updated 11/29/23, 19:25

Commit message

The ClassMapGenerator is used in non-composer ("legacy") mode
installations and builds files used for PSR-autoloading.

It only parsed class|interface|trait files, but not files containing
enum type definitions. Thus, the PSR-autoloading created by this
classmap was not able to autoload these enum files.

The underlying code had been adapted from the Composer libraries
some time in the past, meanwhile that code from Composer was extracted
to the package "composer/class-map-generator" and has drifted from
the current TYPO3 implementation.

That implementation at https://github.com/composer/class-map-generator/blob/953cc4ea32e0c31f2185549c7d216d7921f03da9/src/PhpFileParser.php#L118
supports "enum" class loading in case the PHP version matches.

This patch simply also adds "enum" as a recognized identifier.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Wouter Wolters +1
    • Andreas Kienast +1
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 1

Files 1

Review log 1214

  1. Garvin Hicking uploaded patch set 1 11/29/23, 14:07

  2. core-ci voted on patch set 1 V +1 11/29/23, 14:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50116

  3. Andreas Kienast voted on patch set 1 CR +1 11/29/23, 14:36

  4. Wouter Wolters voted on patch set 1 CR +1 11/29/23, 14:39

  5. Oliver Klee voted on patch set 1 CR +1 11/29/23, 14:47

  6. Garvin Hicking rebased onto patch set 2 CR +1 V +1 11/29/23, 14:49

  7. Garvin Hicking commented on patch set 2 11/29/23, 14:51

    Frerk I'm sorry, I accidentally rebased the patch due to another issue and reset the votes. :(
  8. Oliver Klee voted on patch set 2 CR +1 11/29/23, 14:54

  9. core-ci voted on patch set 2 V +1 11/29/23, 14:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50122

  10. Andreas Kienast voted on patch set 2 CR +1 11/29/23, 15:09

  11. Benni Mack voted on patch set 2 CR +1 11/29/23, 15:45

  12. Wouter Wolters voted on patch set 2 CR +1 11/29/23, 16:32

  13. Christian Kuhn voted on patch set 2 CR +2 V +2 11/29/23, 19:25

  14. Christian Kuhn merged patch set 3 11/29/23, 19:25