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

Make TypedData plugins conform better to the Plugin Interfaces

$
0
0

This is a follow up to #1845546: Implement validation for the TypedData API. I found numerous todos that were related to various approaches with the TypedData Plugin Manager class and it's factory. This patch fixes those todos, removes the expanded and unnecessary usage of createInstance(), move the manager create() method to call $this->createInstance() instead of $this->factory->createInstance(), and appropriately injects the Manager and Validator into the plugins since they apparently need access to them. There are a few documentation thing I did here that I know are patently wrong within the Factory. $name and $parent seem to only mater for non-primitive TypedData plugins, we should document how that matters a bit better. The factory still exists because TypedData plugins have some interesting special casing they need in order to instantiate the proper class (and can apparently be overridden to some degree). I think the changes are probably pretty self explanatory.

Eclipse

AttachmentSizeStatusTest resultOperations
typed_data_improvements.patch7.14 KBIgnored: Check issue status.NoneNone

Viewing all articles
Browse latest Browse all 294883

Trending Articles



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