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

CommentFileSizeAuthor
#3 process_plugins.patch70.24 KBquietone

Issue fork drupal-3421016

Command icon 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:

Comments

larowlan created an issue. See original summary.

mohit_aghera’s picture

Note: BC approach to handle annotations and attributes in MigratePluginManager class is being evaluated in https://www.drupal.org/project/drupal/issues/3424509

We should revisit and rebase this PR after this is resolved.

quietone’s picture

StatusFileSize
new70.24 KB

Attaching a patch that has conversions for the process plugins. It does not include work on the manager or the attribute class.

godotislate’s picture

catch’s picture

quietone’s picture

Issue summary: View changes
Status: Postponed » Needs review
quietone’s picture

Issue summary: View changes
Status: Needs review » Postponed
alexpott’s picture

Status: Postponed » Closed (duplicate)
godotislate’s picture

Status: Closed (duplicate) » Needs review

Re-opened to convert the remaining process plugins.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Seems all 78 instances of @MigrateProcessPlugin have been replaced.

quietone’s picture

I 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.

godotislate’s picture

I am disappointed to see many of these changed to one-liners and I have noticed this on other issues as well.

I 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.

alexpott’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 8c0975a467 to 11.x and ee650b2e7f to 10.3.x. Thanks!

  • alexpott committed ee650b2e on 10.3.x
    Issue #3421016 by quietone, godotislate: Convert MigrateProcessPlugin...

  • alexpott committed 8c0975a4 on 11.x
    Issue #3421016 by quietone, godotislate: Convert MigrateProcessPlugin...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.