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

Derivative plugin definitions contain base plugin IDs instead of derivative IDs

$
0
0

Problem/Motivation

Most, if not all derivers do not set plugin IDs for derivative definitions explicitly, but provide it by merging in the base field definition for defaults. This means that for any derivative definition, the specified ID is that of the base plugin, even though the keys in the definitions array are correct (see #2458723: Incomplete documentation for DiscoveryInterface::getDefinitions()).

Proposed resolution

Merge in the derivative ID in \Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator. The problem is that this class was designed to work with both array and object definitions by casting object definitions to arrays. This only works for accessing values, but not for setting them.

Remaining tasks

Find a way to set the derivative ID.

User interface changes

None.

API changes

None.


Viewing all articles
Browse latest Browse all 292695

Trending Articles



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