Problem/Motivation
In #3252386: Use PHP attributes instead of doctrine annotations we added support for attribute based plugin discovery.
As part of that issue we converted block and action plugins.
This issue is to convert \Drupal\migrate\Annotation\MigrateProcessPluginplugins to use Attributes.
Proposed resolution
Convert remaining MigrateProcessPlugins to MigrateProcess attirbutes.
Remaining tasks
#3424509: Update MigratePluginManager to include both attribute and annotation class
Review
Commit
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | process_plugins.patch | 70.24 KB | quietone |
Issue fork drupal-3421016
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3421016-convert-migrateprocessplugin-plugin
changes, plain diff MR !7316
Comments
Comment #2
mohit_aghera commentedNote: BC approach to handle annotations and attributes in
MigratePluginManagerclass is being evaluated in https://www.drupal.org/project/drupal/issues/3424509We should revisit and rebase this PR after this is resolved.
Comment #3
quietone commentedAttaching a patch that has conversions for the process plugins. It does not include work on the manager or the attribute class.
Comment #4
godotislateBlocked on #3424509: Update MigratePluginManager to include both attribute and annotation class
Comment #5
catchComment #7
quietone commentedComment #8
quietone commentedComment #9
alexpottComment #10
godotislateRe-opened to convert the remaining process plugins.
Comment #11
smustgrave commentedSeems all 78 instances of @MigrateProcessPlugin have been replaced.
Comment #12
quietone commentedI am disappointed to see many of these changed to one-liners and I have noticed this on other issues as well. It seems reasonable to me to keep the style of the coding standard for annotations. And worse, for me, it makes these harder to scan. Since there is no coding standard specific for attributes I have created #3439004: Coding standard for attributes.
Comment #13
godotislateI received feedback to convert id-only attributes to one-liners on other issues for consistency, so I changed them similarly here. I agree that multi-line attributes with named properties are more readable, but people have made cases the other way. While I do have a preference, I don't feel that strongly about it, but putting coding standards in place is a reasonable next step.
Comment #14
alexpottCommitted and pushed 8c0975a467 to 11.x and ee650b2e7f to 10.3.x. Thanks!