Problem/Motivation
The \Drupal\Core\Annotation\Mail plugins have support for derivatives, since Drupal\Core\Mail\MailManager's discovery is decorated with \Drupal\Core\Plugin\Discovery\ContainerDerivativeDiscoveryDecorator. However, the admin form does not take into account that usually (as is the case through all of Drupal core) the getDerivativeDefinitions() implementation of the deriver does not alter the id of the $base_plugin_definition when building its derivative definitions. Instead, the plugin_id is obtained by using the array keys of the definitions returned by the plugin manager's getDefinitions() implementation.
Steps to reproduce
Create a mail plugin with derivatives (at least two) and do not alter the id of the $base_plugin_definition when building its derivative definitions. Go to /admin/config/system/mailsystem and only one of the two derivatives will be available in the admin form.
Proposed resolution
Follow the patterns in Drupal core and use the array keys as plugin ids.
Remaining tasks
Create the MR, review it & merge it.
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Issue fork mailsystem-3445094
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
jelle_sComment #4
jelle_sComment #7
berdirThanks, merged.