Problem/Motivation

Working on Display Builder, #3562989: Implements RevisionLogInterface for Instance entity, we noticed some quirks in the soruce field model:

  • FieldItemInterface::propertyDefinitions() is missing, we need to define source_id, source, third_party_settings and node_id
  • SourceValueItem is extending Drupal\Core\Field\Plugin\Field\FieldType\MapItem which doesn't seem to be the good parent, because it imply there is a single value property bagging the source_id, source, third_party_settings and node_id properties
  • source_id must be required

Proposed resolution

Fix those. the module is experimental, so we cna break, but it would be nice to keep the compatibility.
Add some tests?

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pdureau created an issue. See original summary.

pdureau’s picture

Assigned: Unassigned » pdureau

I will give a try.

Would it also be the opportunity to add an index in order to improve performance? Unfortunately, the best candidate, node_id is not mandatory at UI Patterns level.

pdureau’s picture

Issue summary: View changes
pdureau’s picture

Assigned: pdureau » Unassigned
Status: Active » Needs review

Let's talk :)