Page MenuHomePhabricator

Deprecate and remove Parser::clearState()
Open, Needs TriagePublic


Only caller is Kartographer extension:

and it probably has no effect there. We shouldn't be recycling parser objects, just create a new one for your parse.

Event Timeline

Please be aware that in the current parser implementation, some extensions use the onClearState hook provided by MediaWiki. Are you planning on removing that too?

If this is the case, I would love to take a look at this patch for the Variables extension and the discussion about the necessity of the use of this hook for the extension. If we find a solution which works there (possibly by adding a hook to the ParserOutput constructor), it will work for all these extensions, except maybe for TemplateStyles.