Page MenuHomePhabricator

PHP Deprecated: Use of MediaWiki\Output\OutputPage::wrapWikiTextAsInterface was deprecated in MediaWiki 1.45. [Called from MediaWiki\Extension\Translate\Synchronization\ExportTranslationsSpecialPage::execute]
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Deprecated: Use of MediaWiki\Output\OutputPage::wrapWikiTextAsInterface was deprecated in MediaWiki 1.45. [Called from MediaWiki\Extension\Translate\Synchronization\ExportTranslationsSpecialPage::execute]
FrameLocationCall
from/srv/mediawiki/php-1.45.0-wmf.5/extensions/Translate/src/Synchronization/ExportTranslationsSpecialPage.php(78)
#0[internal function]MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, string)
#1/srv/mediawiki/php-1.45.0-wmf.5/includes/debug/MWDebug.php(386)trigger_error(string, int)
#2/srv/mediawiki/php-1.45.0-wmf.5/includes/debug/MWDebug.php(357)MediaWiki\Debug\MWDebug::sendRawDeprecated(string, bool, string)
#3/srv/mediawiki/php-1.45.0-wmf.5/includes/debug/MWDebug.php(238)MediaWiki\Debug\MWDebug::deprecatedMsg(string, string, string, int)
#4/srv/mediawiki/php-1.45.0-wmf.5/includes/GlobalFunctions.php(782)MediaWiki\Debug\MWDebug::deprecated(string, string, string, int)
#5/srv/mediawiki/php-1.45.0-wmf.5/includes/Output/OutputPage.php(2216)wfDeprecated(string, string)
#6/srv/mediawiki/php-1.45.0-wmf.5/extensions/Translate/src/Synchronization/ExportTranslationsSpecialPage.php(78)MediaWiki\Output\OutputPage->wrapWikiTextAsInterface(string, string)
#7/srv/mediawiki/php-1.45.0-wmf.5/includes/specialpage/SpecialPage.php(734)MediaWiki\Extension\Translate\Synchronization\ExportTranslationsSpecialPage->execute(null)
#8/srv/mediawiki/php-1.45.0-wmf.5/includes/specialpage/SpecialPageFactory.php(1739)MediaWiki\SpecialPage\SpecialPage->run(null)
#9/srv/mediawiki/php-1.45.0-wmf.5/includes/actions/ActionEntryPoint.php(499)MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#10/srv/mediawiki/php-1.45.0-wmf.5/includes/actions/ActionEntryPoint.php(143)MediaWiki\Actions\ActionEntryPoint->performRequest()
#11/srv/mediawiki/php-1.45.0-wmf.5/includes/MediaWikiEntryPoint.php(198)MediaWiki\Actions\ActionEntryPoint->execute()
#12/srv/mediawiki/php-1.45.0-wmf.5/index.php(58)MediaWiki\MediaWikiEntryPoint->run()
#13/srv/mediawiki/w/index.php(3)require(string)
#14{main}
Impact
Notes

Event Timeline

Seen in MediaWiki-extensions-Translate, but also tagging other extensions based on codesearch. I don’t know why Deprecate OutputPage::wrapWikiTextAsInterface() claims the method was unused. (Unused in MediaWiki core, perhaps? But that’s not the relevant standard according to the stable interface policy: hard deprecation requires the method being unused in all Wikimedia-maintained code.)

I really thought it was unused. I did a Codesearch, but apparently I used the "MediaWiki core" tab for it (I found https://codesearch.wmcloud.org/core/?q=wrapWikiTextAsInterface\b&files=&excludeFiles=&repos= in my browser history). I must have had Codesearch opened on that tab from some other work and didn't notice I'm searching the wrong place.

Probably best to back out the hard-deprecation for now, I'll send a patch.

Change #1155700 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] Change OutputPage::wrapWikiTextAsInterface() to soft-deprecation

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

Change #1155714 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/core@master] WIP: Restore OutputPage::wrapWikiTextAsInterface() hard-deprecation

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

I really thought it was unused. I did a Codesearch, but apparently I used the "MediaWiki core" tab for it (I found https://codesearch.wmcloud.org/core/?q=wrapWikiTextAsInterface\b&files=&excludeFiles=&repos= in my browser history). I must have had Codesearch opened on that tab from some other work and didn't notice I'm searching the wrong place.

Ah, that explains it :) thanks for the fast response!

Change #1155700 merged by jenkins-bot:

[mediawiki/core@master] Change OutputPage::wrapWikiTextAsInterface() to soft-deprecation

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

Change #1155749 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@wmf/1.45.0-wmf.5] Change OutputPage::wrapWikiTextAsInterface() to soft-deprecation

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

Change #1155749 merged by jenkins-bot:

[mediawiki/core@wmf/1.45.0-wmf.5] Change OutputPage::wrapWikiTextAsInterface() to soft-deprecation

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

Mentioned in SAL (#wikimedia-operations) [2025-06-11T20:06:12Z] <cjming@deploy1003> Started scap sync-world: Backport for [[gerrit:1155749|Change OutputPage::wrapWikiTextAsInterface() to soft-deprecation (T396618)]]

Mentioned in SAL (#wikimedia-operations) [2025-06-11T20:08:27Z] <cjming@deploy1003> matmarex, cjming: Backport for [[gerrit:1155749|Change OutputPage::wrapWikiTextAsInterface() to soft-deprecation (T396618)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-06-11T20:16:12Z] <cjming@deploy1003> Finished scap sync-world: Backport for [[gerrit:1155749|Change OutputPage::wrapWikiTextAsInterface() to soft-deprecation (T396618)]] (duration: 10m 00s)

matmarex claimed this task.

Change #1155714 merged by jenkins-bot:

[mediawiki/core@master] Restore OutputPage::wrapWikiTextAsInterface() hard-deprecation

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

Change #1156953 had a related patch set uploaded (by Yaron Koren; author: Yaron Koren):

[mediawiki/extensions/Cargo@master] Replace deprecated wrapWikiTextAsInterface()

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

Change #1156953 merged by jenkins-bot:

[mediawiki/extensions/Cargo@master] Replace deprecated wrapWikiTextAsInterface()

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