Problem/Motivation
Similar to #3477520: Add support for PHP attributes for EncryptionMethod plugins, the Key module should support adding PHP attributes for KeyProvider plugins, since this is the way forward for core.
This MR provides attributes for KeyInput, KeyProvider, and KeyType, the three annotations provided by the Key module. It also adds an attribute next to the annotation in each plugin.
The only intentional change is that I did not implement "storage" for KeyProvider, since this is deprecated and none of the built-in plugins use it.
Issue fork key-3483550
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
ptmkenny commentedComment #4
ptmkenny commentedComment #5
ptmkenny commentedComment #8
ptmkenny commentedThe current MR ONLY adds attribute support without actually adding the attribute to the plugins. The reason is because attributes will break on PHP < 8.1 and don't work with Drupal < 10.2. Since this module supports older versions of Drupal, addition of attributes to plugins should be postponed, but the Attribute itself can be committed now so that downstream modules (with stricter version requirements) can start using it.
Comment #11
ptmkenny commentedAs per #8, I think this is ready to go, but if it gets committed, we should create a follow-up issue to actually use the attributes within Key and then drop the annotations when Key requires at least Drupal 10.2.
Comment #12
ptmkenny commentedComment #13
rajeshreeputraComment #16
ptmkenny commentedNow that there is a 2.x branch of Key, we should do the full conversion and require Drupal 10.2.
Comment #17
ptmkenny commentedOk, this is now working again.
The MR adds support for PHP attributes (adds attribute classes for Key's three annotations) and converts Key's built-in plugins to use the new attributes instead of annotations.
This requires Drupal 10.2 at a minimum.
I have moved this to the 2.x branch but it could be part of 1.x if 1.x gets bumped to 10.2+.
Comment #19
john franklin commentedIt's been seven months since the last update to the MR. Any ETA on when this will get reviewed and merged?
Comment #20
japerryMarking NW due to the refactor in 2.x. I don't think attributes will get added to 1.x unless we need it for migration purposes. Also, note that attributes is a new feature, so as long as annotations aren't removed, the minimum version of Drupal doesn't need to be changed.