Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Work in progress Orphaned

92025[FEATURE] Add attribute-based registry for Extension Scanner matchers

Sebastian Mendel CR 0 V 0 Hard +552 −0 updated 12/06/25, 13:54

Commit message

This patch introduces a PHP attribute-based registry for Extension Scanner
matchers, replacing the need for manual iteration over matcher classes.

The implementation includes:

- ExtensionScannerMatcher: A PHP 8 attribute to mark classes as Extension
  Scanner matchers. The attribute optionally accepts a custom configuration
  file name.

- MatcherRegistry: A registry class that automatically discovers all matcher
  classes annotated with the ExtensionScannerMatcher attribute using
  reflection. It provides methods to get matcher classes, configurations,
  and create matcher instances.

- All 22 concrete matcher classes have been annotated with the new attribute.

Benefits:
- Self-registering matchers eliminate manual list maintenance
- Adding new matchers only requires adding the attribute to the class
- Configuration files are automatically resolved from class names
- Cleaner architecture following modern PHP patterns

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 5
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/25/92025/5 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/25/92025/5 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Files 25

Show 5 more files

Review log 712

  1. Sebastian Mendel uploaded patch set 1 12/06/25, 11:52

  2. core-ci voted on patch set 1 V +1 12/06/25, 11:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91730

  3. Sebastian Mendel uploaded patch set 2 12/06/25, 12:00

    Copied Votes: * Verified+1 (copy condition: "**changekind:NO_CHANGE**")
  4. core-ci voted on patch set 2 V +1 12/06/25, 12:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91731

  5. Sebastian Mendel uploaded patch set 3 V +1 12/06/25, 12:33

  6. Sebastian Mendel uploaded patch set 4 12/06/25, 12:44

  7. core-ci voted on patch set 3 V -1 12/06/25, 12:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91736

  8. core-ci voted on patch set 4 V +1 12/06/25, 12:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91738

  9. Sebastian Mendel uploaded patch set 5 V +1 12/06/25, 13:10

  10. core-ci voted on patch set 5 V +1 12/06/25, 13:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91744

  11. Garvin Hicking commented on patch set 5 12/06/25, 13:38

    Unresolved

    (We'll also need a "Resolves" line and a feature rest.)

    ExtensionScannerMatcher.php:40 Unresolved

    Nice! I think we should name this AsExtensionScannerMatcher though to be in line with most our custom attributes. Great you got on this so quickly
  12. Garvin Hicking commented on patch set 5 12/06/25, 13:54

    MatcherRegistry.php:90 Unresolved

    I think this needs integration with Symfony DI and regular autoloading. Maybe check out https://review.typo3.org/c/Packages/TYPO3.CMS/+/91161 How to use it with service locators.