daniel added a comment. |
In T152491#2923592, @Aleksey_WMDE wrote:If we need to wrap it in a closure I don't understand why do we need an interface in the first place?
The callback is the factory for the actual deserializer object. The entity type definition file functions as a DI wiring file.
It is of course possible to use the callbacks directly. And if PHP has function types, that's what I would suggest doing. But since PHP doesn't have that, it's nicer to have an interface and objects, to provide at least some type safety.
TASK DETAIL
EMAIL PREFERENCES
To: Ladsgroup, daniel
Cc: thiemowmde, Aleksey_WMDE, gerritbot, Jakob_WMDE, WMDE-leszek, Aklapper, Addshore, Ladsgroup, daniel, Th3d3v1ls, Ramalepe, Liugev6, Lewizho99, Maathavan, D3r1ck01, Izno, Wikidata-bugs, aude, Mbch331
Cc: thiemowmde, Aleksey_WMDE, gerritbot, Jakob_WMDE, WMDE-leszek, Aklapper, Addshore, Ladsgroup, daniel, Th3d3v1ls, Ramalepe, Liugev6, Lewizho99, Maathavan, D3r1ck01, Izno, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs