#110269Allow row updater registration with PHP attribute
Description
Row updaters implementing TYPO3\CMS\Core\Upgrades\RowUpdater\RowUpdaterInterface
are executed by the databaseRowsUpdateWizard upgrade wizard. It iterates over
all rows of all TCA tables once and hands each row to every registered row
updater which announced a potential update for the table, which makes them the
tool of choice for data migrations that cannot be expressed as a plain SQL
statement.
Until now the list of row updaters was a hard-coded, TYPO3 Core internal
property of TYPO3\CMS\Core\Upgrades\DatabaseRowsUpdateWizard. Extension and
project developers had no supported way to ship their own implementation.
Expected
- A new PHP attribute
TYPO3\CMS\Core\Attribute\AsRowUpdaterregisters a class
implementingRowUpdaterInterfaceas row updater. - The attribute takes an optional identifier, which falls back to the fully
qualified class name when omitted. - Manual registration with the
install.rowupdaterservice tag stays possible,
for cases where the class cannot carry the attribute.
Details
RowUpdaterRegistryreceives the tagged services as a lazyServiceLocator
indexed by identifier, so only row updaters that still need to run are
instantiated.RowUpdaterServicecombines the registry with the executed state kept in the
system registry (installUpdateRows/rowUpdatersDone).DatabaseRowsUpdateWizardandUpgradeWizardsServiceaddress row updaters by
identifier instead of instantiating class names read from the system registry.
The identifier must therefore be unique and stable once a row updater has been
executed.- Both receive their dependencies through constructor injection, dropping the
remainingGeneralUtility::makeInstance()calls in that code path.
Continues the work of the parent epic to allow shipping upgrade wizards without
requiring EXT:install (#106947).
Reviews 1
Files 1
History 39
-
Gerrit Code Review pushed patch set 12 for main to change 91662 status
NewUnder Review <span data-processor="relativetime" data-value="2026-07-22T17:47:17+00:00" > 07/22/26, 17:47 </span> -
Stefan Bürk changed category assigned to Stefan Bürk <span data-processor="relativetime" data-value="2026-07-24T22:38:14+00:00" > 07/24/26, 22:38 </span>
-
Gerrit Code Review pushed patch set 13 for main to change 91662 <span data-processor="relativetime" data-value="2026-08-06T12:58:48+00:00" > 08/06/26, 12:58 </span>
-
Gerrit Code Review pushed patch set 14 for main to change 91662 <span data-processor="relativetime" data-value="2026-08-14T07:24:27+00:00" > 08/14/26, 07:24 </span>
-
Stefan Bürk commented and changed attached test_rowupdater.zip <span data-processor="relativetime" data-value="2026-08-14T13:51:10+00:00" > 08/14/26, 13:51 </span>
-
Gerrit Code Review pushed patch set 15 for main to change 91662 <span data-processor="relativetime" data-value="2026-08-14T13:53:14+00:00" > 08/14/26, 13:53 </span>
-
Gerrit Code Review pushed patch set 16 for main to change 91662 <span data-processor="relativetime" data-value="2026-08-14T18:29:08+00:00" > 08/14/26, 18:29 </span>
-
Gerrit Code Review pushed patch set 17 for main to change 91662 <span data-processor="relativetime" data-value="2026-08-16T00:29:29+00:00" > 08/16/26, 00:29 </span>
-
Stefan Bürk commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-08-31T21:30:09+00:00" > 08/31/26, 21:30 </span>Applied in changeset commit:d8c1db1e3847e6d076c0878b3a913cb93f0c8931.
Example extension for the row updater registration
Attached “test_rowupdater.zip” is a minimal example extension, used to verify
this change in a real installation instead of only through the functional test
fixtures.
Why it is uploaded here and not shipped with the change: the functional test
fixtures below EXT:core are not meant to be installed in a running system, and
they only cover the registration itself. Reviewers, however, need something
they can drop into “typo3conf/ext” to walk through the complete flow once,
including the schema change and the wizard execution. Keeping that example in
the issue, rather than in the patch, keeps the change free of code which is of
no use for a shipped TYPO3 installation.
What the extension contains:
“rowupdater_identifier”
fills that field with “rowupdater_” plus the page uid for every “pages” row
still having an empty value, and only when the field really exists in the
database
How to use it: unpack below “typo3conf/ext”, activate the extension, run the
extension setup, and afterwards execute the “databaseRowsUpdateWizard” upgrade
wizard.
The change has been verified with this extension in the backend module of the
install tool, in the standalone install tool, and on the command line.