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\editor\Annotation\Editorplugins 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
| Comment | File | Size | Author |
|---|
Issue fork drupal-3421011
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 #2
kalpanajaiswal commentedConverted Editor plugin discovery to attributes.
Comment #3
kalpanajaiswal commentedConverted Editor plugin discovery to attributes.
Comment #4
wim leersThanks! 😊 Could you please convert this to a merge request, for much faster test results?
Comment #7
mstrelan commentedMR is up, added feedback and suggestions to the MR.
Comment #9
wim leersAccepted the other suggestion, to fix the spelling error.
Comment #10
wim leersI'm the subsystem maintainer and would like to be able to sign off on this. Love where this is going! 😄👍
Comment #12
sorlov commentedComment #13
smustgrave commentedAppears to phpcs and stan errors.
Comment #14
wim leersComment #15
wim leersBecause
\Drupal\editor\Plugin\EditorPluginInterface::getJSSettings()and\Drupal\editor\Plugin\EditorPluginInterface::getLibraries()inappropriately are using the concreteEditorclass in their signature rather thanEditorInterface, an awkward aliasing-upon-using was necessary 😥As far as I'm concerned, this is ready (except for the one comment nit that is yet to be applied).
Comment #16
wim leersI can reproduce the test failure locally. It's in a test that was added >9 years ago, in #2442255: Changing text formats on a field makes it impossible to edit..
Comment #17
quietone commentedComment #18
wim leersThe sole remaining unresolved thread is still not resolved, and it's about fixing a big bug in the current MR: https://git.drupalcode.org/project/drupal/-/merge_requests/6776#note_278485
Comment #20
wim leersThis looks ready to me now!
But one test is failing:
🤔 Re-testing…
Comment #21
smustgrave commentedAppears all feedback has been addressed
All instances replaced
Tests are green :)
Comment #22
alexpottCommitted e715970 and pushed to 11.x. Thanks!
Committed c84ae09 and pushed to 10.3.x. Thanks!