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 subscriber: PleaseStand.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 21 2015, 6:20 PM
Tgr added a project: MediaWiki-Vagrant.EditedOct 12 2015, 6:20 PM
Tgr added a subscriber: Tgr.

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

Tgr added a comment.Oct 12 2015, 7:35 PM

The above is a workaround for vagrant.

Rical added a subscriber: Rical.Oct 14 2015, 8:03 AM
TheDJ added a subscriber: TheDJ.Oct 14 2015, 5:40 PM

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 ?

Anomie added a subscriber: Anomie.Oct 15 2015, 5:52 PM

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
Rical removed a subscriber: Rical.Mar 20 2018, 9:54 AM
TheDJ removed a subscriber: TheDJ.Mar 28 2018, 9:30 AM

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

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

CCicalese_WMF closed this task as Resolved.Apr 18 2018, 6:21 PM
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