Page MenuHomePhabricator

Scribunto uses deprecated SyntaxHighlight_GeSHi methods
Closed, ResolvedPublic

Description

When viewing a page in the Module namespace on my test wiki, I am getting the following deprecation warnings:

Deprecated: Use of SyntaxHighlight_GeSHi::prepare is deprecated. [Called from ScribuntoContent::fillParserOutput in /home/ki/Projects/mediawiki/extensions/Scribunto/common/ScribuntoContent.php at line 123] in /home/ki/Projects/mediawiki/core/includes/debug/MWDebug.php on line 300
Deprecated: Use of SyntaxHighlight_GeSHi::buildHeadItem is deprecated. [Called from ScribuntoContent::fillParserOutput in /home/ki/Projects/mediawiki/extensions/Scribunto/common/ScribuntoContent.php at line 136] in /home/ki/Projects/mediawiki/core/includes/debug/MWDebug.php on line 300

Related Objects

Event Timeline

PleaseStand raised the priority of this task from to Needs Triage.
PleaseStand updated the task description. (Show Details)
PleaseStand added a project: Scribunto.
PleaseStand subscribed.
Tgr subscribed.

This also breaks Vagrant's import::dump somehow.

SyntaxHighlight_GeSHi::prepare() is deprecated but it's not clear what the replacement is supposed to be.

Change 245580 had a related patch set uploaded (by Gergő Tisza):
[DO NOT MERGE] Make SyntaxHighlight_GeSHi::highlight public

https://gerrit.wikimedia.org/r/245580

Change 245581 had a related patch set uploaded (by Gergő Tisza):
[DO NOT MERGE] Fix SyntaxHighlight incompatibility

https://gerrit.wikimedia.org/r/245581

The above is a workaround for vagrant.

I don't really like that we have to explicitly add the Geshi modules from inside Scribunto. Shouldn't we pass an 'output' object into the highlight function ? Or at the very least have a public method inside Geshi::addRLModules( output, language ) or something ?

As long as the semantics are "add RL modules to $output" rather than "call $output->setText()", either way seems like it would work for Scribunto.

Reedy triaged this task as High priority.Dec 1 2017, 7:46 PM

Change 245581 merged by jenkins-bot:
[mediawiki/extensions/Scribunto@master] Fix SyntaxHighlight incompatibility

https://gerrit.wikimedia.org/r/245581

CCicalese_WMF claimed this task.

Change 427463 had a related patch set uploaded (by Cicalese; owner: Gergő Tisza):
[mediawiki/extensions/Scribunto@REL1_31] Fix SyntaxHighlight incompatibility

https://gerrit.wikimedia.org/r/427463

Change 427463 merged by jenkins-bot:
[mediawiki/extensions/Scribunto@REL1_31] Fix SyntaxHighlight incompatibility

https://gerrit.wikimedia.org/r/427463