Skip to content
Snippets Groups Projects
Commit ffe4d969 authored by Garvin Hicking's avatar Garvin Hicking Committed by Christian Kuhn
Browse files

[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: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarAndreas Kienast <a.fernandez@scripting-base.de>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarcore-ci <typo3@b13.com>
parent 0f1d8a3d
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment