After upgrading MediaWiki to 1.37 and to FlaggedRevs – (4dec80b) 14:21, 10 October 2021, I get the following error on the wiki, making it unusable:
Fatal error: Uncaught Error: Undefined constant "APCOND_FR_EDITSUMMARYCOUNT" in /var/www/vhosts/example.com/httpdocs/extensions/FlaggedRevs/FlaggedRevsSetup.php:55 Stack trace: #0 /var/www/vhosts/example.com/httpdocs/extensions/FlaggedRevs/FlaggedRevsSetup.php(31): FlaggedRevsSetup->setAutopromoteConfig() #1 /var/www/vhosts/example.com/httpdocs/extensions/FlaggedRevs/backend/FlaggedRevsHooks.php(68): FlaggedRevsSetup->doSetup() #2 /var/www/vhosts/example.com/httpdocs/includes/HookContainer/HookContainer.php(338): FlaggedRevsHooks::onMediaWikiServices() #3 /var/www/vhosts/example.com/httpdocs/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook() #4 /var/www/vhosts/example.com/httpdocs/includes/HookContainer/HookRunner.php(2517): MediaWiki\HookContainer\HookContainer->run() #5 /var/www/vhosts/example.com/httpdocs/includes/MediaWikiServices.php(268): MediaWiki\HookContainer\HookRunner->onMediaWikiServices() #6 /var/www/vhosts/example.com/httpdocs/extensions/BootstrapComponents/src/HookRegistry.php(381): MediaWiki\MediaWikiServices::getInstance() #7 /var/www/vhosts/example.com/httpdocs/extensions/BootstrapComponents/src/HookRegistry.php(87): BootstrapComponents\HookRegistry->registerMyConfiguration() #8 /var/www/vhosts/example.com/httpdocs/extensions/BootstrapComponents/src/BootstrapComponents.php(90): BootstrapComponents\HookRegistry->__construct() #9 /var/www/vhosts/example.com/httpdocs/includes/registration/ExtensionRegistry.php(546): BootstrapComponents\BootstrapComponents::init() #10 /var/www/vhosts/example.com/httpdocs/includes/registration/ExtensionRegistry.php(231): ExtensionRegistry->exportExtractedData() #11 /var/www/vhosts/example.com/httpdocs/includes/Setup.php(168): ExtensionRegistry->loadFromQueue() #12 /var/www/vhosts/example.com/httpdocs/includes/WebStart.php(90): require_once('...') #13 /var/www/vhosts/example.com/httpdocs/index.php(44): require('...') #14 {main} thrown in /var/www/vhosts/example.com/httpdocs/extensions/FlaggedRevs/FlaggedRevsSetup.php on line 55
If I comment my current configuration in LocalSettings.php out OR downgrade to FlaggedRevs for 1.36 OR downgrade my PHP to 7.4 the error goes away.
#$wgFlaggedRevsAutoconfirm = [ # 'days' => 15, # days since registration # 'edits' => 25, # total edit count # 'spacing' => 3, # spacing of edit intervals # 'benchmarks' => 5, # how many edit intervals are needed? # 'excludeLastDays' => 1, # exclude the last X days of edits from edit counts # 'totalContentEdits' => 50, # $wgContentNamespaces edits OR... # 'totalCheckedEdits' => 25, # ...Edits before the stable version of pages # 'uniqueContentPages' => 5, # $wgContentNamespaces unique pages edited # 'editComments' => 10, # how many edit comments used? # 'email' => true, # user must be emailconfirmed? # 'neverBlocked' => true, # Can users that were blocked be promoted? #]; #$wgFlaggedRevsAutopromote = [ # 'days' => 30, # days since registration # 'edits' => 50, # total edit count # 'excludeLastDays' => 2, # exclude the last X days of edits from below edit counts # 'benchmarks' => 10, # number of "spread out" edits # 'spacing' => 3, # number of days between these edits (the "spread") # 'totalContentEdits' => 100, # edits to pages in $wgContentNamespaces # 'totalCheckedEdits' => 50, # edits before the stable version of pages # 'uniqueContentPages' => 10, # unique pages in $wgContentNamespaces edited # 'editComments' => 25, # number of manual edit summaries used # 'userpageBytes' => 0, # size of userpage (use 0 to not require a userpage) # 'neverBlocked' => true, # username was never blocked before? # 'email' => true, # user must be emailconfirmed? # 'maxRevertedEditRatio' => 0.03, # max fraction of edits reverted via "rollback"/"undo" #];
MediaWiki 1.36 worked with this configuration, PHP 8 and the stable FlaggedRev for 1.36 that can currently be downloaded, the same is true for MediaWiki 1.35 and the respective stable FlaggedRevs version with PHP 8.
(I'm aware MediaWiki states it does not support PHP 8 yet, I've just been using it for a long while with no observed issues)