This patch introduces multiple handling:
- if the input is an array when none is requested, Get switches the pipeline to multiple mode.
- In multiple mode, if the process plugin can't handle arrays itself MigrateExecutable::processRow will iterate that array and call the plugin for each value.
This existed in Drupal 7 somewhat here and there but in a way that was specific to each "plugin" as it existed there. This is centralized and while makes the code a bit more complicated it makes writing migrations a lot simpler as we have already seen in role migrations (which pass with the sandbox, I'm working on getting the relevant pieces of sandbox into core).
Incidentally, this patch adds bypass support to the static map but I really don't want to go into hunk-by-hunk submission for core; I am already doing it for MigrateExecutable and it's a PITA.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 2154209_9.patch | 15.41 KB | chx |
| #9 | interdiff.txt | 5.17 KB | chx |
| #6 | interdiff.txt | 2.2 KB | chx |
| #6 | 2154209_6.patch | 13.71 KB | chx |
Comments
Comment #2
chx commentedComment #3
chx commentedComment #4
dawehnerNitpick: missing "."
Let's document that as it is the core of that patch.
Mabye: "The base class for all process plugins".
Work for a possible follow up: provide a little bit more context in the exception.
Comment #6
chx commentedLooks like a bot fluke. Addressed issues. Seems the patch missed the interface change altogether.
Comment #7
dawehnerThank you!
Comment #8
chx commentedSigh.
Comment #9
chx commentedDisregard #8 , better idea.
Comment #10
dawehnerI like that we safe some bit of code here.
Comment #12
chx commentedI'd like to apologize to webchick for the disparaging comment in #8 -- her review actually made the code much better. Thanks!
Comment #13
webchickCool, this addresses all of my feedback from IRC!
Committed and pushed to 8.x. Thanks!