Problem/Motivation

Over in #2233883: Link migration needs to convert source url into the appropriate route format for storage we're adding logic to the LoadEntity specific for the link field type. As we need more processing for other field types this may become unruly. This issue is to discuss/implement howe we could simplify the load entity.

Proposed resolution

To be discussed. Probably per field type process plugins or at the very least, per field type methods on the load entity.

Remaining tasks

Discussion, patch.

User interface changes

API changes

CommentFileSizeAuthor
#5 interdiff.txt1.58 KBbenjy
#5 2395993-5.patch6.13 KBbenjy
#3 2395993-3.patch5.85 KBbenjy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

I am against this change. Contrib can use the existing hook_migrate_load to change the migration entity after it is loaded. That's what we bet the farm on for every migration, dynamic or static. There's no need to further plugin-ify this.

benjy’s picture

Status: Active » Postponed

Postponing this for now on #2394567: File field need associated metadata during cck_field migration and #2394571: Filter formats on cck text fields are not looked up in the idMap They don't technically block this, but they're both quite important and this issue is likely to just be a bit of a clean-up.

benjy’s picture

Status: Postponed » Needs review
FileSize
5.85 KB

We've discussed that having another plugin system for per field type processing is probably un-needed overkill. It's only really useful in core for cck fields and contrib can use the entity hooks to manipulate the process array.

So, attached patch is simply a small proposed clean-up, moving the processing into their own methods.

chx’s picture

Title: Per field type process plugins » Clean up Loadentity a little
Status: Needs review » Needs work

I think a switch would be even cleaner than a chain of if-elseif

benjy’s picture

Status: Needs work » Needs review
FileSize
6.13 KB
1.58 KB

Sure.

chx’s picture

Status: Needs review » Reviewed & tested by the community

Nice.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Migrate changes are not frozen in beta. Committed cb3eb2f and pushed to 8.0.x. Thanks!

  • alexpott committed cb3eb2f on 8.0.x
    Issue #2395993 by benjy: Clean up Loadentity a little
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.