https://bugzilla.wikimedia.org/show_bug.cgi?id=51479
--- Comment #9 from [email protected] --- These lines were put in some MW versions ago to obtain a deep clone of the Parser object (i.e. clone of the parser and all of the contained objects). This parser clone is needed to parse the form with a properly initialized parser (e.g. also including all initialization steps done by any extension) while keeping the original parser state intact. Then in a later MW version people got all excited about the new features of newer PHP versions and included unnamed closures in the Parser (or was it ParserOptions) object. Which are alas not serializable. The two easy solutions that obviously do not work are to just use the original parser and hope it does not break too badly, and to try to make the Parser serializable again. The first fails with the bug discussed here. The second fails because we will never ever convince anybody to merge a core patch to make the Parser serializable again and also because if any extension somehow managed to attach a closure to the Parser, e.g. via ParserOptions, it fails again. So there remain two solutions. The first would be to somehow conjure a Parser object from scratch and get it into a state similar enough to wgParser, that it serves our purposes. This mostly includes setting the proper ParserOptions and getting extensions to include their JS and CSS. I do not know if this is even possible, but it would certainly be a major performance drain. The second would be to finally completely rewrite that function so that it does not change the parser state in a destructive way. This however would probably end up in a complete redesign of SF. Good luck. :P -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
