Tgr added a comment.

Thanks, that's nicer than what I wrote for option 2. The only potential problem I can see is when something uses createDifferenceEngine to get an instance, and the content handler or GetDifferenceEngine hook handler subclasses it, and the subclass overrides something in a way that breaks delegation. (In Gerrit there is only one case where that would happen, with SpecialUndelete::showDiff calling generateContentDiffBody; that would have to be fixed manually.) That level of breakage is unavoidable though - option 1 has the same problem with subclassing and option 3 would result in loads of B/C breaks (I've realized that I forgot about direct object creation and apparently there's a metric ton of that).

All the hooks that receive a DifferenceEngine object operate on the page level (except DifferenceEngineShowDiff and DifferenceEngineShowEmptyOldContent which could arguably go both ways, and maybe DifferenceEngineAfterLoadNewText / DifferenceEngineLoadTextAfterNewContentIsLoaded ) so those won't need to be updated either. Sounds like the best plan so for.


TASK DETAIL
https://phabricator.wikimedia.org/T194731

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Tgr
Cc: Aklapper, gerritbot, daniel, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, PDrouin-WMF, Gq86, Baloch007, E1presidente, Ramsey-WMF, Cparle, Darkminds3113, Anooprao, SandraF_WMF, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Tramullas, Acer, LawExplorer, Lewizho99, JJMC89, Maathavan, Agabi10, Susannaanas, Aschroet, Jane023, Wikidata-bugs, Base, matthiasmullie, aude, Ricordisamoa, Lydia_Pintscher, Fabrice_Florin, Raymond, Steinsplitter, Mbch331, Ltrlg
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to