[BUGFIX] Support legacy-mode PSR-autoloading for enum type files
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. Resolves: #102498 Releases: main, 12.4 Change-Id: I1b98e8ceeecd25f1512d3539e84de6c725a8e3c6 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82034 Reviewed-by:Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Andreas Kienast <a.fernandez@scripting-base.de> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Benni Mack <benni@typo3.org> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
core-ci <typo3@b13.com>
Please register or sign in to comment