Problem/Motivation
Quoting yched from #2002138-52: Use an adapter for supporting typed data on ContentEntities:
the "definition" objects are primarily TypedData definition objects, instead of "just" being domain definition objects. That greatly complexifies FieldDefinition / Field / FieldInstance since:
- they have to extend DataDefinition, some methods of which make little sense for the domain
- they cannot be a self-contained collection of domain properties (field type, name, cardinality, settings...), but need to be split between a "definition" and an internal "item definition"
Proposed resolution
Once #2268009: Make typed data object instantiation more flexible is done we do not need typed data definitions for instantiating field items any more and can safely decouple field definitions from typed data definitions, i.e. without running into performance issues during prototyping.
Remaining tasks
- #2268009: Make typed data object instantiation more flexible
- Identify the methods to remove and do it.
User interface changes
-
API changes
- Some methods will be removed from the FieldDefinitionInterface, changing Item constraints will have to change
- Field definitions will not be typed data definitions any more.
Postponed until
#2268009: Make typed data object instantiation more flexible
Comments
Comment #1
xjmComment #2
mgiffordPosponed because of issue fixed with #2002138: Use an adapter for supporting typed data on ContentEntities so re-opening.
Comment #3
jhedstromComment #4
fagoWe've bumped into issues with incompatibilities between data and field definitions now in #2329937: Allow definition objects to provide options and #2204509: Allow context definitions to specify default values - so seems like this would be helpful to solve that.
Comment #5
xjmThis issue was marked as a beta target for the 8.0.x beta, but is not applicable as an 8.1.x beta target, so untagging.
Not sure if this could be implemented with BC, but we could at least start the decoupling, deprecate things, and then actually decouple in a 9.x. followup. So moving to 8.2.x.
Comment #6
xjm