Problem/Motivation

Drupal is moving towards attributes for plugin discovery, see https://www.drupal.org/project/drupal/issues/3396165

Proposed resolution

Convert plugin discovery to attributes

Remaining tasks

  1. Write a merge request
  2. Review
  3. Commit

User interface changes

None

API changes

Extra Field plugins are now preferably declared through attributes

Data model changes

None

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

idebr created an issue. See original summary.

idebr’s picture

Status: Active » Needs review

The merge request converts ExtraField plugin discovery to attributes

macsim’s picture

Code looks correct to me.

Tested the MR on a D10.5.1 and, after switching my plugin declaration from a doctrine annotation to a PHP attribute definition + clearing the cache, it works like a charm : I see the extrafield on my content type's view mode (BO/FO)

Just covered the ExtraFieldDisplay attribute though.

Still need to test the ExtraFieldForm attribute.

macsim’s picture

Status: Needs review » Reviewed & tested by the community

Also tested the ExtraFieldForm attribute ; after clearing the cache I see the element on my form mode definition and in my entity form.

RTBC for me

hitchshock’s picture

Tested it on my project, and it works nicely.
Old annotations still work + new attributes work too.

RTBC

pcambra’s picture

I think to be able to merge this we need to bump the info.yml requirements and composer.json? to over 10.5?

pcambra’s picture

Nvm, this is a different change

  • pcambra committed ea9b4ae6 on 3.0.x authored by idebr
    Issue #3522923: Convert plugin discovery to attributes
    
pcambra’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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