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
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 1899950-8.patch | 8.28 KB | eclipsegc |
| typed_data_improvements.patch | 7.14 KB | eclipsegc |
Comments
Comment #1
sunComment #2
webchickThere's a patch here; marking needs review.
Comment #4
eclipsegc commentedtyped_data_improvements.patch queued for re-testing.
Comment #6
eclipsegc commentedtyped_data_improvements.patch queued for re-testing.
Comment #8
eclipsegc commentedSome basic cleanups of the old patch. Let's see how the testbot feels about this.
Eclipse
Comment #23
quietone commentedReviewing the git logs I think this is outdated and the work was accomplished as part of #1867856: Use annotation discovery for data type plugins. Therefor, I am closing this as outdated.
If that is wrong, re-open the issue and update the issue summary with what still needs to be done.
Thanks