Closed (fixed)
Project:
Drupal core
Version:
8.6.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Jan 2018 at 17:01 UTC
Updated:
26 Jun 2018 at 17:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
msankhala commented@joachim I am not an expert in migration. What do you think should be the clear doc here?
Comment #4
joachim commentedHow about:
> A process plugin will typically implement the transform() method to perform its work. However, it is possible instead for a process plugin to use any number of methods, thus offering different alternatives ways of processing. In this case, the transform() method should not be implemented, and the plugin configuration must provide the name of the method to be called via the "method" key. Each method must have the same signature as transform(). The base class \Drupal\migrate\ProcessPluginBase takes care of implementing transform() and calling the configured method.
Comment #5
msankhala commented@joachim This makes perfect sense and more clear than the existing doc.
Comment #6
msankhala commentedHere is the patch.
Comment #7
lomasr commentedI think we can include path to transform() method also core/modules/migrate/src/ProcessPluginBase.php. Which overrides public function MigrateProcessInterface::transform.
Comment #8
marxjohnson commentedThe patch applies fine and makes a lot more sense than the previous text. I don't think it's necessary to add a the full path of the file containing ProcessPluginBase. There's already a @see tag in the docblock for the MirgrateProcessInterface class so it should be linked when the docs are compiled, and PHPStorm found it fine for me on Ctrl+Click. In addition, you can see the transform() method in the MigrateProcessInterface file if you need to know the signature.
Comment #9
alexpottCrediting @joachim for filing the issue and reviewing. Crediting @lomasr and @marxjohnson reviewers for discussing the improvement.
Comment #10
alexpottCommitted and pushed 15946fea43 to 8.6.x and ad12560f98 to 8.5.x. Thanks!
As a docs improvement backported to 8.5.x.
migrate.migration.d6_field_instance_widget_settings.yml doesn't exist anymore so let's fix that as we go.
Comment #13
msankhala commented@alexpott Should the mention of migrate.migration.d6_field_instance_widget_settings.yml should be removed in another follow-up issue or I should submit the patch on this same issue?