#111654Add EntityInterface and ValueObjectInterface and check on them instead of the abstract classes
Description
Current state
Extbase decides what a domain object is by checking for abstract classes:
AbstractDomainObjectinCleanStateTracker,Backend,PersistenceManager,ExtbaseHistoryTrackerand Fluid’sAbstractFormViewHelperAbstractValueObjectinBackend::insertObject(),UriBuilder,PersistentObjectConverter,BackendInterface::getUidOfAlreadyPersistedValueObject()andDebuggerUtilityAbstractEntityinDebuggerUtilityandClassesConfigurationFactory
A model therefore has to extend one of these classes, although they only carry boilerplate. DomainObjectInterface exists, but it does not tell entities and value objects apart, and the framework does not rely on it consistently.
The distinction matters: a value object is looked up by its property values before it is inserted, it is serialized to an array in URIs when it has no uid, and its __identity is dropped during property mapping.
Goal
- Add
EntityInterfaceandValueObjectInterfaceas signaling interfaces without methods.getUid(),getPid()andsetPid()stay onDomainObjectInterfacefor now. AbstractEntityimplementsEntityInterface,AbstractValueObjectimplementsValueObjectInterface.- The framework checks on the two interfaces only. The abstract classes stay as optional boilerplate and are no longer asked for.
- A class implementing both interfaces is rejected when its class schema is built.
Out of scope
- Methods on the new interfaces
- Removing
DomainObjectInterfaceandAbstractDomainObject
Reviews 1
History 01
-
Gerrit Code Review pushed patch set 1 for main to change 98192 status
NewUnder Review 11/29/26, 12:45