Page MenuHomePhabricator

Use OutputPage::appendExtensionData for wikibase-otherprojects-sidebar
Open, Needs TriagePublic


As evidenced in SidebarHookHandlerTest, wikibase uses ::setExtensionData for the wikibase-otherprojects-sidebar data. This should probably use ::appendExtensionData instead, to avoid destructive updates (see parent task for rationale).

Event Timeline

As far as I see, it’s executed at most once per parse (assuming that ContentAlterParserOutput is called at most once), so it should be safe to continue using ParserOutput::setExtensionData. (It sets an array, but in one pass. And the order matters, which is not guaranteed if the set behavior of ParserOutput::appendExtensionData is taken seriously.)