Closed (fixed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
migration system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Jan 2017 at 23:52 UTC
Updated:
1 Aug 2017 at 18:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
quietone commentedComment #3
phenaproximaSelf-assigning for review.
Comment #4
gaurav.kapoor commentedPatch reviewed and tested , uploaded with correct format.
Comment #5
claudiu.cristea@gaurav.kapoor, there's no diff between #2 and #4. Why are you reposting the same patch?
Comment #6
claudiu.cristeaAnd the patch was assigned for review to @phenaproxima, you cannot RTBC it.
Comment #7
gaurav.kapoor commentedComment #8
phenaproxima"see handling multiple values" should be removed, or at least further explained, because it seems like it might be a link that was pasted in from the handbook page.
Let's get rid of "logically".
Should have a colon at the end.
Er...needs an explanation.
Let's get rid of [0], [1], etc. -- it's confusing.
This is so convoluted and strangely worded as to be borderline incomprehensible. I think it should be completely rewritten, mostly by the use of examples. This is the sort of plugin that benefits from concrete examples, not complicated and wordy explanations. I can take a stab at this later.
We should rewrite this as part of the rest of the rewrite.
This should go. Nothing is attached.
Comment #10
holingpoon commentedComment #11
holingpoon commented1, 2, 3, 5, 8 from comment No. 8 is now complete. Please refer to files 2845483-11.patch and interdiff-2845483-1-11.txt. This issue still needs more work as some of the documentation needs to be rewritten.
Comment #12
csg commentedThis looks good so far.
Comment #13
holingpoon commentedComment #14
jofitzAddressed #8.4 and corrected some indentation (which had me totally confused until I realised it was an error!)
I'll leave @phenaproxima to have a go at the
hellfun that is #8.6 and #8.7!Comment #15
claudiu.cristeaComment #16
heddnComment #17
jofitzSetting back to "Needs work" so someone (else) can address #8.6 & #8.7:
Comment #18
quietone commentedEmphasize the rename, similar to #2824610: Rename DedupeBase/DedupeEntity process plugins to MakeUnique and add documentation.
Comment #19
heddnThis is an entirely reworked set of docs; hopefully making things clearer. It uses a different example entirely in hopes it is more simple.
Comment #20
heddnI'd also propose a rename from iterator to sub_process. At least that's what I'm looking for votes for or against. Or alternate names.
Comment #21
heddnAn here's the rename.
Comment #22
heddnCopying from IRC, there were votes in favor of sub_process/SubProcess from @phenaproxima and @mikeryan.
Comment #23
phenaproximaSub-processing is extremely hard to sum up in less than 80 characters, but nonetheless, I wonder if there is a better way to phrase this.
I feel like we could sum this up better with something like this: "The sub_process plugin accepts an array of associative arrays and runs each one through its own process pipeline, producing a new associative array of transformed values."
I'm not 100% sure this is accurate. Doesn't it actually specify which key of the transformed row will be the key of that row in the sub_process plugin's output?
"Bye Bye Bye" is now stuck in my head :) Or, for those unfamiliar with '90s boy bands, this should be "processed by".
I don't understand this. What is a "mapping value" in the context of sub_process?
Should be @inheritdoc.
$value not being null does not guarantee that $value is iterable. We should change this line to
if (is_array($value) || $value instanceof \Traversable)Nit -- Can we just change this to
->willReturn($sub_process_plugins)?Comment #24
heddn#23.5: I removed that from the docs. After reviewing my notes and the code, this is actually a limitation of the get process plugin. Not of sub_process.
All the rest of the points are strait forward and addressed.
Comment #25
phenaproximaTotally getting there. It's improving each time, and this is by far the hardest plugin to explain in a succinct manner.
Can we rephrase this even more, to "Runs an array of arrays through a process pipeline."
I still don't understand this. I think it needs to be illustrated with an explicit example.
Comment #26
heddnComment #27
phenaproximaI am almost totally satisfied with this :) @heddn, you are a champ. I have but one complaint before being ready to RTBC.
I think this example could be a bit clearer. Can we change it to something more concrete, like an example involving concat, so that it's obvious what the generated key would be?
In this example, the keys of the returned array would be filter__2 and filter__0.
Comment #28
heddnComment #29
phenaproximaI think you uploaded the wrong patch. :)
Comment #30
heddnHere's the right patch now.
Comment #31
phenaproximaEr...#30 seems to be missing the changes I see in the interdiff from #26?
Comment #32
heddn/me blushes.
Comment #33
phenaproximaThis pleases me.
Comment #35
gábor hojtsyThanks folks.
I checked that the depreciation implementation is right. Looked around existing depreciated classes in migrate which have this trigger_error in core. I did not find the docs on how to do this but this is consistent with the other existing implementations of keeping the class around and its docs as it was.
The expanded docs look great, good job IMHO :)
Comment #36
mikeryanI've published the change record.
Comment #38
heddnTagging for release notes.