Field plugin unique identifiers

Follow-up to Use CSV column names when creating migration fi... (#3182902 - closed) (comments #5 and #6): an importer whose unique identifier uses the reference type "Field Plugin" imported nothing. The import reported success, but processed no row.

getIds() used the machine name of the referenced field mapping as the source ID name and as its type, and expected identifier settings that the options form never stores for this reference type.

  • Add EntityImporterInterface::getUniqueIdentifierSourceIds(), used by getIds() of all sources, the header validation and the template download.
  • A "Field Plugin" identifier uses the source name of the field mapping as source ID. Its type comes from the field storage of the mapping's destination, such as string.value, with string as fallback.
  • "Field Type" identifiers work as before.
  • Kernel test with a source plugin without file, and a Functional test with a CSV file; the Functional test fails without the fix.

Merge request reports

Loading
Loading