Hi Everyone,
We have a small wiki running Ubuntu 20.04.4 LTS (fully patched) and Mediawiki 1.36.4 at https://www.cryptopp.com/wiki. We also have a bash-based maintenance script that runs a bunch of Mediawiki maintenance scripts. Our script include Mediawiki's rebuildFileCache.php.
Running MW 1.36 rebuildFileCache.php results in lots of deprecated warnings.
I see Mediawiki 1.38 is approaching a release. I'm filing this issue so the deprecated warnings don't fall off the radar. My apologies if this has already been addressed.
What happens?:
When running rebuildFileCache.php, it results in a bunch of deprecated warnings:
$ ./our-script.sh ... Running rebuildFileCache.php PHP Deprecated: Premature access to service container [Called from RebuildFileCache::finalSetup in /var/www/html/w/maintenance/rebuildFileCache.php at line 53] in /var/www/html/w/includes/debug/MWDebug.php on line 376 Deprecated: Premature access to service container [Called from RebuildFileCache::finalSetup in /var/www/html/w/maintenance/rebuildFileCache.php at line 53] in /var/www/html/w/includes/debug/MWDebug.php on line 376 PHP Deprecated: Premature access to service 'HookContainer' [Called from MediaWiki\MediaWikiServices::getInstance in /var/www/html/w/includes/MediaWikiServices.php at line 252] in /var/www/html/w/includes/debug/MWDebug.php on line 376 Deprecated: Premature access to service 'HookContainer' [Called from MediaWiki\MediaWikiServices::getInstance in /var/www/html/w/includes/MediaWikiServices.php at line 252] in /var/www/html/w/includes/debug/MWDebug.php on line 376 PHP Deprecated: Premature access to service 'ObjectFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 535] in /var/www/html/w/includes/debug/MWDebug.php on line 376 Deprecated: Premature access to service 'ObjectFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 535] in /var/www/html/w/includes/debug/MWDebug.php on line 376 PHP Deprecated: Premature access to service 'ReadOnlyMode' [Called from RebuildFileCache::finalSetup in /var/www/html/w/maintenance/rebuildFileCache.php at line 53] in /var/www/html/w/includes/debug/MWDebug.php on line 376 Deprecated: Premature access to service 'ReadOnlyMode' [Called from RebuildFileCache::finalSetup in /var/www/html/w/maintenance/rebuildFileCache.php at line 53] in /var/www/html/w/includes/debug/MWDebug.php on line 376 PHP Deprecated: Premature access to service 'ConfiguredReadOnlyMode' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 1121] in /var/www/html/w/includes/debug/MWDebug.php on line 376 Deprecated: Premature access to service 'ConfiguredReadOnlyMode' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 1121] in /var/www/html/w/includes/debug/MWDebug.php on line 376 PHP Deprecated: Premature access to service 'MainConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 291] in /var/www/html/w/includes/debug/MWDebug.php on line 376 Deprecated: Premature access to service 'MainConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 291] in /var/www/html/w/includes/debug/MWDebug.php on line 376 PHP Deprecated: Premature access to service 'ConfigFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 734] in /var/www/html/w/includes/debug/MWDebug.php on line 376 Deprecated: Premature access to service 'ConfigFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 734] in /var/www/html/w/includes/debug/MWDebug.php on line 376 PHP Deprecated: Premature access to service 'BootstrapConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 277] in /var/www/html/w/includes/debug/MWDebug.php on line 376 Deprecated: Premature access to service 'BootstrapConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 277] in /var/www/html/w/includes/debug/MWDebug.php on line 376 PHP Deprecated: Premature access to service 'DBLoadBalancer' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 1122] in /var/www/html/w/includes/debug/MWDebug.php on line 376 Deprecated: Premature access to service 'DBLoadBalancer' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 1122] in /var/www/html/w/includes/debug/MWDebug.php on line 376 PHP Deprecated: Premature access to service 'DBLoadBalancerFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 383] in /var/www/html/w/includes/debug/MWDebug.php on line 376 Deprecated: Premature access to service 'DBLoadBalancerFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 383] in /var/www/html/w/includes/debug/MWDebug.php on line 376 PHP Deprecated: Premature access to service 'StatsdDataFactory' [Called from ObjectCache::newFromParams in /var/www/html/w/includes/objectcache/ObjectCache.php at line 149] in /var/www/html/w/includes/debug/MWDebug.php on line 376 Deprecated: Premature access to service 'StatsdDataFactory' [Called from ObjectCache::newFromParams in /var/www/html/w/includes/objectcache/ObjectCache.php at line 149] in /var/www/html/w/includes/debug/MWDebug.php on line 376 PHP Deprecated: Premature access to service 'LocalServerObjectCache' [Called from ObjectCache::getLocalServerInstance in /var/www/html/w/includes/objectcache/ObjectCache.php at line 255] in /var/www/html/w/includes/debug/MWDebug.php on line 376 Deprecated: Premature access to service 'LocalServerObjectCache' [Called from ObjectCache::getLocalServerInstance in /var/www/html/w/includes/objectcache/ObjectCache.php at line 255] in /var/www/html/w/includes/debug/MWDebug.php on line 376 PHP Deprecated: Premature access to service 'MainWANObjectCache' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 406] in /var/www/html/w/includes/debug/MWDebug.php on line 376 Deprecated: Premature access to service 'MainWANObjectCache' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/w/includes/ServiceWiring.php at line 406] in /var/www/html/w/includes/debug/MWDebug.php on line 376 Nothing to do -- $wgUseFileCache is disabled.
What should have happened instead?:
Clean running of rebuildFileCache.php.
Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:
Mediawiki 1.36.4, https://www.cryptopp.com/wiki/Special:Version
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal