Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294288

[meta] Introduce specific annotations for each plugin type

$
0
0

Problem/Motivation

@Plugin is a dumping ground for metadata, and is often used for configuration, not metadata (information that is only useful once you have an instantiated plugin)
It also conveys no information to those looking at a plugin implementation
It provides no place to document the keys used by that particular annotation

Proposed resolution

Introduce @PluginID for those that only need a plugin ID (Views handlers, Tour tips, eventually many basic ones in contrib)
Force any complex annotations to be custom classes, so they can be properly documented and discoverable.
For example, instead of @Plugin, have @EntityType.

Remaining tasks

Open issues for each plugin type

User interface changes

N/A

API changes

Remove @Plugin (\Drupal\Component\Annotation\Plugin) completely


Viewing all articles
Browse latest Browse all 294288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>