Problem/Motivation
Building the UI to edit the column aliases requires the file object as it is after setupFile(). That is a protect method but fortunately it is called from the public method initializeIterator(). So that can be used. Unfortunately, that is not the case. It does not work because CSV::initializeIterator() doesn't always return the file object. In the case when the source plugin uses yield it returns a Generator.
See #2942373: Add UI to alter column_names for CSV source files
Proposed resolution
Add a getter for $file
Remaining tasks
Patch
review
Comment | File | Size | Author |
---|---|---|---|
#6 | interdiff-5-6.txt | 489 bytes | Ada Hernandez |
#6 | 2954413-6.patch | 1.45 KB | Ada Hernandez |
Comments
Comment #2
quietone CreditAttribution: quietone at Acro Commerce commentedA patch.
Comment #3
heddnLet's add a quick unit test and this is good to go. Tagging as novice, because something like this is a great opportunity for someone new to creating php unit tests.
Comment #4
edysmpworking on this,
Comment #5
edysmpAttaching a test.
Comment #6
Ada Hernandez CreditAttribution: Ada Hernandez at MTech, LLC commentedfixing some nits
Comment #8
heddn