Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Document and rename the 'iterator' process plugin because its name is not intuitive and we need better docs.
Proposed resolution
recursive_process
Remaining tasks
- Bikeshedding
- Add docs
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#32 | 2845483-32.patch | 12.13 KB | heddn |
Comments
Comment #2
quietone CreditAttribution: quietone as a volunteer commentedComment #3
phenaproximaSelf-assigning for review.
Comment #4
gaurav.kapoor CreditAttribution: gaurav.kapoor at OpenSense Labs 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 CreditAttribution: gaurav.kapoor at OpenSense Labs 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 CreditAttribution: holingpoon as a volunteer and commentedComment #11
holingpoon CreditAttribution: holingpoon as a volunteer and 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 CreditAttribution: csg at Cheppers commentedThis looks good so far.
Comment #13
holingpoon CreditAttribution: holingpoon as a volunteer and commentedComment #14
jofitz CreditAttribution: jofitz at ComputerMinds commentedAddressed #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
jofitz CreditAttribution: jofitz at ComputerMinds commentedSetting back to "Needs work" so someone (else) can address #8.6 & #8.7:
Comment #18
quietone CreditAttribution: quietone as a volunteer 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.