Review main Merged

91662[FEATURE] Register row updaters via PHP attribute

Stefan Bürk CR +2 V +2 Hard +745 −83 updated 08/31/26, 21:27

Commit message

The new PHP attribute `AsRowUpdater` registers implementations of
`RowUpdaterInterface` for the `databaseRowsUpdateWizard` upgrade
wizard. Until now the list of row updaters was a hard-coded, Core
internal property of `DatabaseRowsUpdateWizard`, leaving extension
and project developers without a supported way to ship their own
row updater. Registration is now done with the attribute, or
manually with the `install.rowupdater` service tag, and each row
updater is addressed by a unique identifier which falls back to
the class name if none is given.

`RowUpdaterRegistry` receives the tagged services as a lazy
`ServiceLocator`, `RowUpdaterService` combines them with the
executed state kept in the system registry. Both are consumed by
`DatabaseRowsUpdateWizard` and `UpgradeWizardsService`, which now
address row updaters by identifier instead of instantiating class
names read from the registry entry.

`DatabaseRowsUpdateWizard` and `RowUpdaterService` receive their
dependencies through constructor injection, dropping the remaining
`GeneralUtility::makeInstance()` calls.

Beside the functional tests, this has been verified locally with a
dedicated test extension shipping a row updater, executed in the
install tool backend module, in the standalone install tool and on
the command line. That example extension is attached to the
referenced issue instead of being part of this change, as a
runnable example is of no use within the shipped code base.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Wouter Wolters +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Wouter Wolters +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 17

Review log 2643

Show 918 earlier messages
  1. Stefan Bürk uploaded patch set 1 11/14/25, 08:26

  2. core-ci voted on patch set 1 V -1 11/14/25, 08:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89665

  3. Stefan Bürk uploaded patch set 2 V -1 11/14/25, 14:23

  4. core-ci voted on patch set 2 V -1 11/14/25, 14:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89693

  5. Stefan Bürk uploaded patch set 3 V -1 11/14/25, 19:49

  6. core-ci voted on patch set 3 V -1 11/14/25, 20:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89720

  7. Stefan Bürk uploaded patch set 4 V -1 11/14/25, 21:08

  8. core-ci voted on patch set 4 V -1 11/14/25, 21:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89728

  9. Stefan Bürk uploaded patch set 5 V -1 11/14/25, 21:23

  10. core-ci voted on patch set 5 V -1 11/14/25, 21:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89731

  11. Stefan Bürk uploaded patch set 6 V -1 11/14/25, 21:38

  12. core-ci voted on patch set 6 V +1 11/14/25, 21:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89734

  13. Stefan Bürk uploaded patch set 7 V +1 11/24/25, 15:54

  14. Stefan Bürk rebased onto patch set 8 11/24/25, 15:57

  15. core-ci voted on patch set 7 V -1 11/24/25, 16:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90867

  16. core-ci voted on patch set 8 V +1 11/24/25, 16:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90870

  17. Stefan Bürk rebased onto patch set 9 V +1 11/24/25, 17:55

  18. core-ci voted on patch set 9 V +1 11/24/25, 18:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90883

  1. Stefan Bürk rebased onto patch set 10 V +1 11/24/25, 18:54

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

  3. Stefan Bürk uploaded patch set 11 V +1 07/22/26, 17:07

  4. core-ci voted on patch set 11 V -1 07/22/26, 17:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105195

  5. Stefan Bürk uploaded patch set 12 V -1 07/22/26, 17:47

  6. core-ci voted on patch set 12 V +1 07/22/26, 17:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105196

  7. Benni Mack voted on patch set 12 CR +1 07/22/26, 20:49

  8. Benni Mack uploaded patch set 13 CR +1 V +1 08/06/26, 12:58

  9. core-ci voted on patch set 13 V +1 08/06/26, 13:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106000

  10. Stefan Bürk uploaded patch set 14 V +1 08/14/26, 07:24

  11. core-ci voted on patch set 14 V +1 08/14/26, 07:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106694

  12. Stefan Bürk rebased onto patch set 15 V +1 08/14/26, 13:53

  13. core-ci voted on patch set 15 V +1 08/14/26, 14:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106706

  14. Oliver Klee voted on patch set 15 V +1 08/14/26, 14:26

  15. Stefan Bürk rebased onto patch set 16 V +1 08/14/26, 18:29

  16. core-ci voted on patch set 16 V +1 08/14/26, 18:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106712

  17. Benni Mack commented on patch set 16 08/15/26, 06:50

    RowUpdaterService.php:32

    do we need to make this public?
  18. Stefan Bürk uploaded patch set 17 V +1 08/16/26, 00:29

  19. Stefan Bürk commented on patch set 16 08/16/26, 00:30

    PS17 addresses the remark on `RowUpdaterService` (details in that thread). `#[Autoconfigure(public: true)]` is removed from both `RowUpdaterService` and `RowUpdaterRegistry`. `SetupDatabaseService::markWizardsDone()` no longer fetches `RowUpdaterService` from the container, it asks the already fetched `UpgradeWizardsService` for the identifiers through the new `getAllRowUpdaterIdentifiers()`. `RowUpdaterService::getAvailableRowUpdater()` is dropped, it had no other caller. Worth flagging for reviewers: `markWizardsDone()` has no unit or functional coverage at all, so a wrongly private service stays green in phpunit and only surfaces in the installer. Verified locally beyond the usual gates: `e2e-install` on sqlite and mariadb, which drives the real web installer, and the full `e2e` suite, whose prepare step runs `vendor/bin/typo3 setup` and therefore covers the second `markWizardsDone()` caller. Also green: cgl, cglHeaderGit, phpstan, checkIntegrityPhp, and functional on sqlite + mariadb for `core/Tests/Functional/Upgrades` and `install/Tests/Functional`.

    RowUpdaterService.php:32 Reply

    Good catch — and the answer is "no", at least not the way it was done here. Addressed in PS17. `RowUpdaterService` had to be public only because `SetupDatabaseService::markWizardsDone()` pulls it out of the container directly. That `$container->get()` itself cannot become constructor injection: the container handed into `markWizardsDone()` is the late-booted, non-failsafe one from `BootService::loadExtLocalconfDatabase()`, deliberately *not* the failsafe install tool container that built `SetupDatabaseService` — the list has to come from the container that already knows the extensions activated during setup. That is also why `UpgradeWizardsService` carries the same attribute in existing code. The second container fetch can be avoided entirely though. `markWizardsDone()` already fetches `UpgradeWizardsService` one line above, and that service already has `RowUpdaterRegistry` injected and already owns the other row updater listings (`listOfRowUpdatersDone()`, `getWizardInformation()`, `assertIdentifierIsValid()`). So the lookup moved there as `getAllRowUpdaterIdentifiers()`, symmetric to `getNonRepeatableUpgradeWizards()` right above it. With that, `#[Autoconfigure(public: true)]` is gone from **both** `RowUpdaterService` and `RowUpdaterRegistry`. The registry never needed it in the first place — nothing fetched it from the container, and the functional test reaches it through the testing framework private container fallback. `RowUpdaterService::getAvailableRowUpdater()` is dropped as well, its only caller was that line.
  20. Stefan Bürk commented on patch set 17 1 comment 08/16/26, 00:30

  21. core-ci voted on patch set 17 V +1 08/16/26, 00:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106770

  22. Benni Mack voted on patch set 17 CR +1 V +1 08/31/26, 17:19

  23. Wouter Wolters voted on patch set 17 CR +1 V +1 08/31/26, 20:52

  24. Stefan Bürk voted on patch set 17 CR +2 V +2 08/31/26, 21:27

  25. Stefan Bürk merged patch set 18 08/31/26, 21:27