This change in core MediaWiki, in version 1.31, broke full-text search in Special:Drilldown in Cargo:
I got full-text search working again for the latest MediaWiki version about a month ago, with this change:
Unfortunately, it broke full-text search for MediaWiki 1.31 and lower, which I didn't discover until recently.
~~I don't know of a way to have one "CargoSearchMySQL" class that will work with all versions of MediaWiki. Therefore, I think the easiest fix for this is to have two different files, both defining a "CargoSearchMySQL" class, with one file holding the old contents of CargoSearchMySQL.php and one holding the new contents. (Perhaps the files should be called CargoSearchMySQL.php and CargoSearchMySQL-old.php.) Instead of being loaded in extension.json and Cargo.php, they should be loaded in registerExtension() within Cargo.hooks.php, so that there can be an "if" statement call to load the right one, depending on the MW version.~~ (please ignore this)
That's for two reasons: "public" methods being overriden as "private" (which PHP doesn't allow), and because of another change in core MediaWiki, this one in version 1.31:
CargoSearchMySQL should ideally support both the old $wgContLang and the new MediaWikiServices::getInstance()->getContentLanguage(), depending on what is available in the MediaWiki version being used.