Page MenuHomePhabricator

Deprecated call in BlueSpice extensions
Closed, ResolvedPublic

Description

In the master branch, a lot of BlueSpice extensions are triggering deprecation warnings, that causes an error/failure in CI context. An example:

PHP Deprecated:  Use of BsExtensionMW::setConfig was deprecated in MediaWiki 3.0.0.
[Called from BlueSpice\ExtensionFactory::legacyFactory in /workspace/src/extensions/BlueSpiceFoundation/src/ExtensionFactory.php at line 95] 

PHP Deprecated:  Use of BsExtensionMW::setContext was deprecated in MediaWiki 3.0.0.
[Called from BlueSpice\ExtensionFactory::legacyFactory in /workspace/src/extensions/BlueSpiceFoundation/src/ExtensionFactory.php at line 97] 

PHP Deprecated:  Use of BsExtensionMW::setCore was deprecated in MediaWiki 3.0.0.
[Called from BlueSpice\ExtensionFactory::legacyFactory in /workspace/src/extensions/BlueSpiceFoundation/src/ExtensionFactory.php at line 99] 

PHP Deprecated:  Use of BsExtensionMW::setup was deprecated in MediaWiki 3.0.0.
[Called from BlueSpice\ExtensionFactory::legacyFactory in /workspace/src/extensions/BlueSpiceFoundation/src/ExtensionFactory.php at line 102] 

PHP Deprecated:  Use of BsExtensionMW::setHook was deprecated in MediaWiki 3.0.0.
[Called from ArticleInfo::initExt in /workspace/src/extensions/BlueSpiceArticleInfo/ArticleInfo.class.php at line 49]

List of extensions

BlueSpiceAbout
BlueSpiceArticleInfo
BlueSpiceAuthors
BlueSpiceBlog
BlueSpiceChecklist
BlueSpiceContextMenu
BlueSpiceCountThings
BlueSpiceDashboards
BlueSpiceEmoticons
BlueSpiceExtendedStatistics
BlueSpiceGroupManager
BlueSpiceHideTitle
BlueSpiceInsertCategory
BlueSpiceInsertFile
BlueSpiceInsertLink
BlueSpiceInsertMagic
BlueSpiceInsertTemplate
BlueSpiceInterWikiLinks
BlueSpiceMultiUpload
BlueSpiceNamespaceManager
BlueSpicePageAccess
BlueSpicePagesVisited
BlueSpicePageTemplates
BlueSpiceReaders
BlueSpiceRSSFeeder
BlueSpiceSmartList
BlueSpiceSubPageTree
BlueSpiceTagCloud
BlueSpiceUEModulePDF
BlueSpiceUniversalExport
BlueSpiceUserManager
BlueSpiceUserPreferences
BlueSpiceWatchList
BlueSpiceWhoIsOnline

I guess it is BlueSpiceFoundation marking those methods deprecated while they are still being used by several extensions. That is similar to T196084

Details

Related Gerrit Patches:
mediawiki/extensions/BlueSpiceFoundation : masterRemove calls to `wfDeprecated` as they break CI testing
mediawiki/extensions/BlueSpiceWhoIsOnline : masterRemove calls to `wfDeprecated` as they break CI testing
mediawiki/extensions/BlueSpiceWhoIsOnline : masterRemove calls to `wfDeprecated` as they break CI testing

Event Timeline

hashar triaged this task as Normal priority.Jun 21 2018, 2:16 PM
hashar created this task.
hashar updated the task description. (Show Details)Jun 21 2018, 8:22 PM
Vvjjkkii renamed this task from Deprecated call in BlueSpice extensions to yiaaaaaaaa.Jul 1 2018, 1:03 AM
Vvjjkkii raised the priority of this task from Normal to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from yiaaaaaaaa to Deprecated call in BlueSpice extensions.Jul 2 2018, 11:23 AM
CommunityTechBot lowered the priority of this task from High to Normal.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.

An example with BlueSpiceWhoisOnline:

ErrorException from line 309 of /workspace/src/includes/debug/MWDebug.php: PHP Deprecated: Use of BsExtensionMW::setContext was deprecated in MediaWiki 3.0.0. [Called from BlueSpice\ExtensionFactory::legacyFactory in /workspace/src/extensions/BlueSpiceFoundation/src/ExtensionFactory.php at line 97]
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /workspace/src/includes/debug/MWDebug.php(309): trigger_error(string, integer)
#2 /workspace/src/includes/debug/MWDebug.php(241): MWDebug::sendMessage(string, array, string, integer)
#3 /workspace/src/includes/GlobalFunctions.php(1116): MWDebug::deprecated(string, string, string, integer)
#4 /workspace/src/extensions/BlueSpiceFoundation/includes/ExtensionMW.class.php(155): wfDeprecated(string, string)
#5 /workspace/src/extensions/BlueSpiceFoundation/src/ExtensionFactory.php(97): BsExtensionMW->setContext(RequestContext)
#6 /workspace/src/extensions/BlueSpiceFoundation/src/ExtensionFactory.php(83): BlueSpice\ExtensionFactory->legacyFactory(string, WhoIsOnline)
#7 /workspace/src/extensions/BlueSpiceFoundation/src/ExtensionFactory.php(120): BlueSpice\ExtensionFactory->factory(string, array)
#8 /workspace/src/extensions/BlueSpiceFoundation/includes/Core.class.php(297): BlueSpice\ExtensionFactory->getExtensions()
#9 /workspace/src/includes/Setup.php(919): BsCore::doInitialise()
#10 /workspace/src/maintenance/doMaintenance.php(81): require_once(string)
#11 /workspace/src/maintenance/update.php(245): require_once(string)
#12 {main}

Could it be that BlueSpiceFoundation is using a function that it deprecated?

Yes. We thought it would be a good idea to emit deprecated warnings while we are working on version 3. Looks like We'd better remove them completely.

Change 445347 had a related patch set uploaded (by Robert Vogel; owner: Robert Vogel):
[mediawiki/extensions/BlueSpiceWhoIsOnline@master] Remove calls to wfDeprecated as they break CI testing

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

Added two changesets to overcome this issue. We will rely on the doc block annotation for our refactoring, which will probably take some time...

Change 445939 had a related patch set uploaded (by Robert Vogel; owner: Robert Vogel):
[mediawiki/extensions/BlueSpiceFoundation@master] Remove calls to wfDeprecated as they break CI testing

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

Change 445940 had a related patch set uploaded (by Robert Vogel; owner: Robert Vogel):
[mediawiki/extensions/BlueSpiceWhoIsOnline@master] Remove calls to wfDeprecated as they break CI testing

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

Change 445347 abandoned by Robert Vogel:
Remove calls to wfDeprecated as they break CI testing

Reason:
Abandoned in favor of https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/BlueSpiceWhoIsOnline/ /445940/

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

Change 445940 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceWhoIsOnline@master] Remove calls to wfDeprecated as they break CI testing

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

Change 445939 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceFoundation@master] Remove calls to wfDeprecated as they break CI testing

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

@Osnard that is nice! We can then I guess figure out a better solution for the deprecations. At least a bunch of extensions now pass tests \o/

Pwirth closed this task as Resolved.Aug 6 2018, 7:55 AM
Pwirth reopened this task as Open.
Pwirth closed this task as Resolved.Aug 6 2018, 7:58 AM