Review main Merged Breaking

94933[!!!][FEATURE] Register meta tag managers as tagged services

Benni Mack CR +2 V +2 Hard +605 −277 updated 08/13/26, 18:41

Commit message

Meta tag managers are now registered as tagged services via the
new PHP attribute #[AsMetaTagManager] (or the service tag
"metatag.manager") instead of the programmatic registration
through MetaTagManagerRegistry->registerManager() in
ext_localconf.php. The manager order is defined at registration
time via the "before" and "after" attribute arguments,
referencing the identifiers of other managers. A manager without
constraints is ordered before the catch-all "generic" manager,
matching the previous registerManager() default.

The registration and the before/after dependency ordering are
resolved once at container compile time by the new
MetaTagManagerPass instead of executing registration code and
sorting the managers on every request. Managers become proper
services with constructor injection, and the pass validates at
compile time that every tagged service implements
MetaTagManagerInterface and provides an identifier, failing the
container build instead of erroring at rendering time.

This comes with the following breaking changes:

* MetaTagManagerRegistry->registerManager() is now a no-op
  and will be removed in TYPO3 v16.0.
* MetaTagManagerRegistry->removeAllManagers() has been removed,
  the compiled manager list cannot be changed at runtime.
* addProperty(), removeProperty() and removeAllProperties() of
  MetaTagManagerInterface declare a native void return type.
* The PageRenderer state handling applies cached state to the
  container-managed manager instances instead of re-creating
  them via makeInstance().

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Andreas Wolf +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Andreas Wolf +1
    • core-ci +1 CI

Issues 1

Files 23

Show 3 more files

Review log 1013

  1. Benni Mack uploaded patch set 1 07/24/26, 15:37

  2. core-ci voted on patch set 1 V -1 07/24/26, 15:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105343

  3. Benni Mack uploaded patch set 2 V -1 08/06/26, 19:50

  4. Benni Mack marked it ready for review 08/06/26, 19:50

  5. core-ci voted on patch set 2 V -1 08/06/26, 19:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106038

  6. Andreas Wolf commented on patch set 2 CR +1 08/06/26, 20:38

    Only two minor things, code looks fine apart from that.

    MetaTagManagerRegistry.php:107

    ```suggestion $instances[$manager::class] = $manager; ```

    MetaTagManagerPassTest.php:52

    Should this probably be moved one line up to validate that the "after" is actually respected by the ordering process?
  7. Benni Mack uploaded patch set 3 CR +1 V -1 08/12/26, 11:14

  8. Benni Mack commented on patch set 3 08/12/26, 11:14

    MetaTagManagerRegistry.php:107 Reply

    Done

    MetaTagManagerPassTest.php:52 Reply

    Done
  9. core-ci voted on patch set 3 V +1 08/12/26, 11:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106508

  10. Stefan Bürk voted on patch set 3 CR +1 V +1 08/13/26, 18:27

  11. Andreas Wolf voted on patch set 3 CR +1 V +1 08/13/26, 18:40

  12. Stefan Bürk voted on patch set 3 CR +2 V +2 08/13/26, 18:41

  13. Stefan Bürk merged patch set 4 08/13/26, 18:41