Purge uses a custom form implementation to describe forms which provide configuration for plugins. It would be great if Purge could adopt the standard approach to plugin forms for DX.
Problem/Motivation
Purge processor, purger, and queuer plugins implement a custom form plugin system with the "configform" annotation:
\Drupal\purge_queuer_coretags\Plugin\Purge\Queuer\CoreTagsQueuer:
/**
* @PurgeQueuer(
[...]
* configform = "\Drupal\purge_queuer_coretags\Form\ConfigurationForm",
* )
*/
This implementation should be replaced by the core plugin form system outlined in Plugins can provide multiple forms.
Example, \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration:
/**
* @WorkflowType(
[...]
* forms = {
* "configure" = "\Drupal\content_moderation\Form\ContentModerationConfigureForm",
* "state" = "\Drupal\content_moderation\Form\ContentModerationStateForm"
* },
* )
*/
Where many plugin types implement a default "configure" form, via \Drupal\Core\Plugin\PluginWithFormsTrait.
Proposed resolution
Deprecate the existing configform implementation. If plugins choose to implement PluginFormInterface, then use that instead.
Comments
Comment #2
japerry+1 to this! commenting so it gets into our internal queue. Not sure if we can do it in the current major or not though.