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
- Write a merge request
- Review
- Commit
User interface changes
None
API changes
Extra Field plugins are now preferably declared through attributes
Data model changes
None
Issue fork extra_field-3522923
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
Comment #3
idebr commentedThe merge request converts ExtraField plugin discovery to attributes
Comment #4
macsim commentedCode 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
ExtraFieldDisplayattribute though.Still need to test the
ExtraFieldFormattribute.Comment #5
macsim commentedAlso tested the
ExtraFieldFormattribute ; after clearing the cache I see the element on my form mode definition and in my entity form.RTBC for me
Comment #6
hitchshockTested it on my project, and it works nicely.
Old annotations still work + new attributes work too.
RTBC
Comment #7
pcambraI think to be able to merge this we need to bump the info.yml requirements and composer.json? to over 10.5?
Comment #8
pcambraNvm, this is a different change
Comment #10
pcambra