thiemowmde created this task.
thiemowmde added projects: Wikidata, MediaWiki-extensions-WikibaseRepository, Technical-Debt, MediaWiki-extensions-WikibaseClient, Advanced-Search, Wikidata.org, Easy, User-thiemowmde.
Herald added subscribers: TerraCodes, Aklapper.
Herald added a project: TCB-Team.

TASK DESCRIPTION

Several Wikibase codebases use class_exists checks in tests as well as productive code to check if a specific extension is enabled:

if ( !class_exists( 'CheckUser' ) ) {

This binds against a full qualified class name in a super-problematic way that does not fail when the class is renamed or moved to an other namespace. This already caused many regressions in other (related and unrelated) codebases.

All these conditionals must be replaced with a proper check :

if ( !ExtensionRegistry::getInstance()->isLoaded( 'CheckUser' ) ) {

See https://gerrit.wikimedia.org/r/398511 for an example.


TASK DETAIL
https://phabricator.wikimedia.org/T183096

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: thiemowmde
Cc: Aklapper, TerraCodes, aude, hoo, Addshore, WMDE-leszek, Ladsgroup, thiemowmde, Lahi, Gq86, GoranSMilovanovic, Soteriaspace, RazeSoldier, Jayprakash12345, JakeTheDeveloper, QZanden, CXuesong, Zoranzoki21, Lea_WMDE, CKoerner_WMF, MuhammadShuaib, KasiaWMDE, SimmeD, Wikidata-bugs, jayvdb, Tobi_WMDE_SW, Mbch331, Jay8g
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to