Page MenuHomePhabricator

PHP Deprecated: Premature access to service container [Called from MWNamespace::getContentNamespaces in /workspace/src/includes/MWNamespace.php at line 238] in /workspace/src/includes/debug/MWDebug.php on line 376
Closed, ResolvedPublic

Description

For ArticleRatings extension I got this error in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ArticleRatings/+/552375

23:08:01 PHP Deprecated:  Premature access to service container [Called from MWNamespace::getContentNamespaces in /workspace/src/includes/MWNamespace.php at line 238] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:01 
23:08:01 Deprecated: Premature access to service container [Called from MWNamespace::getContentNamespaces in /workspace/src/includes/MWNamespace.php at line 238] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 
23:08:02 Deprecated: Premature access to service 'HookContainer' [Called from MediaWiki\MediaWikiServices::getInstance in /workspace/src/includes/MediaWikiServices.php at line 243] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 PHP Deprecated:  Premature access to service 'HookContainer' [Called from MediaWiki\MediaWikiServices::getInstance in /workspace/src/includes/MediaWikiServices.php at line 243] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 
23:08:02 Deprecated: Premature access to service 'ObjectFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 497] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 PHP Deprecated:  Premature access to service 'ObjectFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 497] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 
23:08:02 Deprecated: Premature access to service 'NamespaceInfo' [Called from MWNamespace::getContentNamespaces in /workspace/src/includes/MWNamespace.php at line 238] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 PHP Deprecated:  Premature access to service 'NamespaceInfo' [Called from MWNamespace::getContentNamespaces in /workspace/src/includes/MWNamespace.php at line 238] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 
23:08:02 Deprecated: Premature access to service 'MainConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 870] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 
23:08:02 Deprecated: Premature access to service 'ConfigFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 696] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 PHP Deprecated:  Premature access to service 'MainConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 870] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 PHP Deprecated:  Premature access to service 'ConfigFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 696] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 
23:08:02 Deprecated: Premature access to service 'BootstrapConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 249] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 PHP Deprecated:  Premature access to service 'BootstrapConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 249] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 
23:08:02 Fatal error: Uncaught InvalidArgumentException: Key "CanonicalNamespaceNames" not found in input sources in /workspace/src/includes/config/ServiceOptions.php:56
23:08:02 Stack trace:
23:08:02 #0 /workspace/src/includes/ServiceWiring.php(870): MediaWiki\Config\ServiceOptions->__construct(Array, Object(GlobalVarConfig))
23:08:02 #1 /workspace/src/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}(Object(MediaWiki\MediaWikiServices))
23:08:02 #2 /workspace/src/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService('NamespaceInfo')
23:08:02 #3 /workspace/src/includes/MediaWikiServices.php(255): Wikimedia\Services\ServiceContainer->getService('NamespaceInfo')
23:08:02 #4 /workspace/src/includes/MediaWikiServices.php(1068): MediaWiki\MediaWikiServices->getService('NamespaceInfo')
23:08:02 #5 /workspace/src/includes/MWNamespace.php(238): MediaWiki\MediaWikiServices->getNamespaceInfo()
23:08:02 #6 /workspace/src/extensions/ArticleRatings/includes/ArticleRatingsHooks.php(10): MWNamespace::getConte in /workspace/src/includes/config/ServiceOptions.php on line 56
23:08:02 PHP Fatal error:  Uncaught InvalidArgumentException: Key "CanonicalNamespaceNames" not found in input sources in /workspace/src/includes/config/ServiceOptions.php:56
23:08:02 Stack trace:
23:08:02 #0 /workspace/src/includes/ServiceWiring.php(870): MediaWiki\Config\ServiceOptions->__construct(Array, Object(GlobalVarConfig))
23:08:02 #1 /workspace/src/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}(Object(MediaWiki\MediaWikiServices))
23:08:02 #2 /workspace/src/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService('NamespaceInfo')
23:08:02 #3 /workspace/src/includes/MediaWikiServices.php(255): Wikimedia\Services\ServiceContainer->getService('NamespaceInfo')
23:08:02 #4 /workspace/src/includes/MediaWikiServices.php(1068): MediaWiki\MediaWikiServices->getService('NamespaceInfo')
23:08:02 #5 /workspace/src/includes/MWNamespace.php(238): MediaWiki\MediaWikiServices->getNamespaceInfo()
23:08:02 #6 /workspace/src/extensions/ArticleRatings/includes/ArticleRatingsHooks.php(10): MWNamespace::getConte in /workspace/src/includes/config/ServiceOptions.php on line 56

Second error for CanonicalNamespaceNames is tracked in T237032.