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
Attachment | Size | Status | Test result | Operations |
---|---|---|---|---|
typed_data_improvements.patch | 7.14 KB | Ignored: Check issue status. | None | None |