Problem/Motivation
The plugin system contains a lot of code that was designed to accomodate array *and* object plugin definitions. As a result type hints are missing for definition parameters and we have to jump through all kinds of hoops to accommodate both data types. This creates code that is hard to read, hard to test, and hard to maintain and extend, of which #2458769: Derivative plugin definitions contain base plugin IDs instead of derivative IDs is an example.
Proposed resolution
Introduce PluginDefinitionInterface
and allow plugin definitions to either be arrays or instances of a class that implements this interface. We can then perform operations on both types of definitions by requires arrays to conform to predefined structure and by calling methods on the interface.
Remaining tasks
Discuss and develop a solution.
User interface changes
None.
API changes
None. This is an internal refactoring only.