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\Core\Field\Annotation\FieldWidget plugins to use Attributes.
Proposed resolution
- Add a class to represent the new Attribute - Example
- Update the plugin manager constructor to include both the attribute and annotation class names - example
- Convert all plugins that use the annotation to use the new attribute - example
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3420978
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:
- 3420978-field-widget
changes, plain diff MR !6629
Comments
Comment #2
mstrelan commentedComment #4
mstrelan commentedComment #5
mstrelan commentedComment #6
smustgrave commentedSorry didn't mean to leave this hanging.
Based on your last comment seems "Additional annotation keys" isn't a problem I believe.
Searched for @FieldWidget and all 37 instances in core have been replaced.
From feedback on other tickets also searched for Field\Annotation\FieldWidget and that was replaced also.
Comment #7
alexpottCommitted d0e9611 and pushed to 11.x. Thanks!
Committed 890e58d and pushed to 10.3.x. Thanks!
Fixed the above on commit. Also did this on the formatter issue too. I agree with @mstrelan that wording of additional keys is odd but saying annotation is worse than attribute so /shrug.