Review 12.4 Merged

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

Christian Kuhn CR +2 V +2 Easy +2 −2 updated 11/29/23, 19:26

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
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 1

Files 1

Review log 34

  1. Christian Kuhn uploaded patch set 1 11/29/23, 19:19

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

  3. Christian Kuhn voted on patch set 1 CR +2 V +2 11/29/23, 19:26

  4. Christian Kuhn merged patch set 2 11/29/23, 19:26