Use uuid as GUID for Drupal entities

Created on 30 August 2022, about 2 years ago
Updated 13 September 2023, about 1 year ago

Problem/Motivation

I want to be able to round trip Drupal entities such as taxonomy terms and nodes, using uuid as the unique identifier. I can do this with migrate framework but feeds doesn't seem to offer a mapping to target an entity's uuid (as it does with nid or tid).

Proposed resolution

Add a FeedsTarget plugin called "uuid". Make sure that it can be set as unique. Add test coverage in the form of a unit test and a kernel test.

Remaining tasks

  • Create the FeedsTarget plugin in src/Feeds/Target.
  • Add a unit test to tests/src/Unit/Feeds/Target for this plugin. The unit test could be a simple as StringTargetTest in case the plugin doesn't need to do any modifications on the data.
  • Add a kernel test to tests/src/Kernel/Feeds/Target for this plugin. This should cover the following:
    • Incoming, correct values are saved on the entity.
    • Malformed values (if applicable) generate a warning.
    • The UUID can be used as unique identifier.
✨ Feature request
Status

Needs review

Version

3.0

Component

Code

Created by

🇳🇿New Zealand jonathan_hunt

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024