Closed (fixed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
migration system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
20 Jan 2017 at 23:50 UTC
Updated:
26 Jul 2017 at 12:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
quietone commentedComment #3
phenaproximaSelf-assigning for review.
Comment #5
ultimike"The file_copy process plugin copies a file from one location to another. Optionally, the file can be moved, reused, or set to be automatically renamed if a duplicate exists."
Add example paths and URIs, including both relative and absolute examples.
Boolean - set to FALSE by default.
Boolean: set to FALSE by default.
- reuse: (optional) Boolean, if TRUE, file can be reused. FALSE by default.
path_to_file:
plugin: file_copy
source: /path/to/file.png
destination: /new/path/to/file.png
Comment #6
phenaproximaComment #7
jofitzChanges in response to code review.
Comment #8
phenaproximaThis should end with a colon.
These should align with the left of the comment, according to @xjm.
Need to align this left. Also, should be a comma after "move the file".
Needs to align left. And should we maybe explain what renaming does in terms of actual behavior? As in, how is the file renamed?
Align left, and explain what reusing means.
Comment #9
jofitzChanges in response to code review.
Comment #10
phenaproximaI'm cuckoo for great patches like this. Love it. Full steam ahead!
Comment #11
xjmCan we put single quotes around example string values?
I have no idea what this means. :) Can we explain a little more?
"Substring" should probably be one word, (since we are not talking about a vehicle that goes underwater or a sandwich). Also not sure what substring is meant by this? It's not explained in the documentation for this method.
Thanks everyone!
Comment #12
jofitzChanges in response to @xjm's code review in #11.
Comment #13
phenaproximaI'm sorry I missed these things last time. I think I was only looking at the interdiff...anyway, this time I have looked at the entire patch. Thanks, @Jo Fitzgerald, for addressing @xjm's comments -- just these things and then I think we're good to go:
This should all just be {@inheritdoc}. Process plugins' transform() method is defined on an interface, and interface method implementations should almost always inherit their documentation. I'm sorry I didn't catch this last time!
These sentences are redundant. Let's remove the second one.
Let us be rid of the "optionally".
Comment #14
jofitzNice quick changes in response to @phenaproxima - we're nearly over the line with this one!
Comment #15
phenaproximaLooks fantastic.
Comment #16
alexpottCommitted and pushed f57baee to 8.4.x and fb8ff16 to 8.3.x. Thanks!
Comment #20
claudiu.cristeaI've opened a followup for this ticket as the added documentation is not 100% correct: #2897533: Documentation and example for FileCopy is wrong