Steps to replicate the issue (include links if applicable):
- Install WikiSearch latest version 8.0.1 (2024-07-25) on MW 1.43
What happens?:
The following deprecation error occurs:
[22-Jan-2025 15:19:05 Europe/Berlin] PHP Deprecated: Use of wfGetDB was deprecated in MediaWiki 1.39. [Called from WikiSearch\WikiSearchHooks::searchConfigCallback in /var/www/html/extensions/WikiSearch/src/WikiSearchHooks.php at line 300] in /var/www/html/includes/debug/MWDebug.php on line 385
The WikiSearchHooks.php calls wfGetDB multiple times:
# grep wfGetDB /var/www/html/extensions/WikiSearch/src/WikiSearchHooks.php
SearchEngineConfig::delete( wfGetDB( DB_MASTER ), $id );
SearchEngineConfig::delete( wfGetDB( DB_MASTER ), $article->getId() );
$database = wfGetDB( DB_PRIMARY );What should have happened instead?:
wfGetDB should be replaced in order to avoid deprecation errors
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
WikiSearch 8.0.1
Other information (browser name/version, screenshots, etc.):
Note. Not sure if the WikiSearch issues should be reported thru Phabricator (no appropriate tag available) or Github [https://github.com/Open-CSP/WikiSearch/issues] please clarify