#111136Move Extbase dirty tracking from the entity into the persistence layer
Description
Extbase domain objects keep their own clean state and answer whether
they have been modified: _memorizeCleanState(), _isDirty(),
_getCleanProperties() and friends live in AbstractDomainObject and in
ObjectMonitoringInterface, which ObjectStorage implements as well.
The persistence layer asks the entity for its own state.
This mixes persistence concerns into the domain model and stands in the
way of moving the Extbase persistence towards Doctrine ORM, where the
UnitOfWork keeps the original entity data and computes change sets
outside of the entity.
Plan (breaking, main only):
- A new CleanStateTracker in the persistence layer keeps the original
values per object and answers the dirty questions. Its method names
follow the UnitOfWork concepts: original entity data, original entity
property, entity change set. - DataMapper, Backend, the lazy loading classes, ExtbaseHistoryTracker,
DebuggerUtility and the Fluid form ViewHelpers use the tracker. - The entity methods _memorizeCleanState(), _memorizePropertyCleanState(),
_getCleanProperties(), _getCleanProperty(), _isDirty(), _isClone(),
_setClone() and ObjectMonitoringInterface are removed, as well as
_memorizeCleanState() and _isDirty() on ObjectStorage. - An object the tracker does not know, for example an unserialized or
cloned entity, is not managed anymore: update() of such an object
with a uid throws an exception instead of writing relations twice.
Fetch the object from the repository (or let the property mapper
convert its identity) and apply the changes before updating it. - The tracker is offered as replacement. It is marked @internal and
only promised for TYPO3 v15, as its shape may change with the move
towards Doctrine ORM.
Public extensions using the removed methods (femanager, sf_event_mgt,
cart, headless) are covered by migration examples in the Breaking
changelog.
Reviews 1
Related issues 1
History 17
-
Alexander Schnitzler changed Related to #70020 <span data-processor="relativetime" data-value="2026-10-18T19:48:41+00:00" > 10/18/26, 19:48 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 96845 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-18T20:07:26+00:00" > 10/18/26, 20:07 </span> -
Gerrit Code Review pushed patch set 2 for main to change 96845 <span data-processor="relativetime" data-value="2026-10-19T04:59:27+00:00" > 10/19/26, 04:59 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 96845 <span data-processor="relativetime" data-value="2026-10-29T10:42:56+00:00" > 10/29/26, 10:42 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 96845 <span data-processor="relativetime" data-value="2026-11-04T08:55:50+00:00" > 11/04/26, 08:55 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 96845 <span data-processor="relativetime" data-value="2026-11-10T08:13:28+00:00" > 11/10/26, 08:13 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 96845 <span data-processor="relativetime" data-value="2026-11-11T08:24:05+00:00" > 11/11/26, 08:24 </span>