There are reports that AbuseFilter is causing problems when running command line maintenance scripts under php 8.4 on MW 1.39. The reporter said php8.4 is fine on the web server, but on maintenance scripts (according to them all maintenance scripts) they get the following error:
[2f84f4a83c06cb6b9e7051a6] [no req] Error: Class "MediaWiki\Extension\AbuseFilter\Parser\RuleCheckerFactory" not found
Backtrace:
from /var/www/html/w/extensions/AbuseFilter/includes/ServiceWiring.php(113)
#0 /var/www/html/w/vendor/wikimedia/services/src/ServiceContainer.php(124): require()
#1 /var/www/html/w/includes/MediaWikiServices.php(447): Wikimedia\Services\ServiceContainer->loadWiringFiles()
#2 /var/www/html/w/includes/MediaWikiServices.php(285): MediaWiki\MediaWikiServices::newInstance()
#3 /var/www/html/w/includes/Hooks.php(174): MediaWiki\MediaWikiServices::getInstance()
#4 /var/www/html/w/includes/exception/MWExceptionHandler.php(807): Hooks::runner()
#5 /var/www/html/w/includes/exception/MWExceptionHandler.php(336): MWExceptionHandler::logError()
#6 /var/www/html/w/includes/AutoLoader.php(244): MWExceptionHandler::handleError()
#7 /var/www/html/w/includes/AutoLoader.php(244): require(string)
#8 /var/www/html/w/extensions/AbuseFilter/includes/ServiceWiring.php(113): AutoLoader::autoload()
#9 /var/www/html/w/vendor/wikimedia/services/src/ServiceContainer.php(124): require(string)
#10 /var/www/html/w/includes/MediaWikiServices.php(447): Wikimedia\Services\ServiceContainer->loadWiringFiles()
#11 /var/www/html/w/includes/MediaWikiServices.php(285): MediaWiki\MediaWikiServices::newInstance()
#12 /var/www/html/w/includes/Setup.php(322): MediaWiki\MediaWikiServices::getInstance()
#13 /var/www/html/w/maintenance/doMaintenance.php(83): require_once(string)
#14 /var/www/html/w/extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php(117): require_once(string)
#15 {main}[They confirmed that the file and class exists when manually loaded with require]
They said they were running php8.4RC3. They said the issue immediately went away after downgrading to php8.2
Its possible that this is something specific to their setup, but i think its worth doing some extra testing of php 8.4 to see if we can reproduce it, just in case.
Original report: https://www.mediawiki.org/wiki/Topic:Yg6g78li1kxvioai https://discord.com/channels/178359708581625856/1306735828776779869