* SearchResult::setExtensionData argument has been changed from accepting an
array to accepting a Closure that returns the array when called.
* Class CryptRand, everything in MWCryptRand except generateHex() and function
- MediaWikiServices::getCryptRand() are deprecated, use random_bytes() to
- generate cryptographically secure random byte sequences.
+ MediaWikiServices::getInstance()->getCryptRand() are deprecated, use
+ random_bytes() to generate cryptographically secure random byte sequences.
* Parser::getConverterLanguage() is deprecated. Use ::getTargetLanguage()
instead.
* Language::markNoConversion() is deprecated. It confused readers because
* All MagicWord static methods are now deprecated. Use the MagicWordFactory
methods instead.
* PasswordFactory::init is deprecated. To get a password factory with the
- standard configuration, use MediaWikiServices::getPasswordFactory.
-* $wgContLang is deprecated, use MediaWikiServices::getContentLanguage()
+ standard configuration, use
+ MediaWikiServices::getInstance()->getPasswordFactory.
+* $wgContLang is deprecated, use
+ MediaWikiServices::getInstance()->getContentLanguage() instead.
+* $wgParser is deprecated, use MediaWikiServices::getInstance()->getParser()
instead.
-* $wgParser is deprecated, use MediaWikiServices::getParser() instead.
* wfGetMainCache() is deprecated, use ObjectCache::getLocalClusterInstance()
instead.
* wfGetCache() is deprecated, use ObjectCache::getInstance() instead.
variables.
* Add a constructor to MyExtHooks that takes a Bar service as a parameter.
* Add a static method called newFromGlobalState() with no parameters. It should
- just return new MyExtHooks( MediaWikiServices::getBar() ).
+ just return new MyExtHooks( MediaWikiServices::getInstance()->getBar() ).
* The original static handler method onFoo( $x ) is then implemented as
self::newFromGlobalState()->doFoo( $x ).
/**
* A read-only mode service which does not depend on LoadBalancer.
- * To obtain an instance, use MediaWikiServices::getConfiguredReadOnlyMode().
+ * To obtain an instance, use MediaWikiServices::getInstance()->getConfiguredReadOnlyMode().
*
* @since 1.29
*/
/**
* Prefix for metric names sent to $wgStatsdServer.
*
- * @see MediaWikiServices::getStatsdDataFactory
+ * @see MediaWikiServices::getInstance()->getStatsdDataFactory
* @see BufferingStatsdDataFactory
* @since 1.25
*/
/**
* Get a load balancer object.
*
- * @deprecated since 1.27, use MediaWikiServices::getDBLoadBalancer()
- * or MediaWikiServices::getDBLoadBalancerFactory() instead.
+ * @deprecated since 1.27, use MediaWikiServices::getInstance()->getDBLoadBalancer()
+ * or MediaWikiServices::getInstance()->getDBLoadBalancerFactory() instead.
*
* @param string|bool $wiki Wiki ID, or false for the current wiki
* @return \Wikimedia\Rdbms\LoadBalancer
/**
* Get the load balancer factory object
*
- * @deprecated since 1.27, use MediaWikiServices::getDBLoadBalancerFactory() instead.
+ * @deprecated since 1.27, use MediaWikiServices::getInstance()->getDBLoadBalancerFactory() instead.
*
* @return \Wikimedia\Rdbms\LBFactory
*/
/**
* A service class for fetching the wiki's current read-only mode.
- * To obtain an instance, use MediaWikiServices::getReadOnlyMode().
+ * To obtain an instance, use MediaWikiServices::getInstance()->getReadOnlyMode().
*
* @since 1.29
*/
/**
* @var Parser $wgParser
- * @deprecated since 1.32, use MediaWikiServices::getParser() instead
+ * @deprecated since 1.32, use MediaWikiServices::getInstance()->getParser() instead
*/
$wgParser = new StubObject( 'wgParser', function () {
return MediaWikiServices::getInstance()->getParser();
protected $configs = [];
/**
- * @deprecated since 1.27, use MediaWikiServices::getConfigFactory() instead.
+ * @deprecated since 1.27, use MediaWikiServices::getInstance()->getConfigFactory() instead.
*
* @return ConfigFactory
*/
/**
* Get the database type used for read operations.
*
- * @see MediaWikiServices::getDBLoadBalancer
+ * @see MediaWikiServices::getInstance()->getDBLoadBalancer
*
* @since 1.21
*
*
* @since 1.26
* @return WANObjectCache
- * @deprecated Since 1.28 Use MediaWikiServices::getMainWANObjectCache()
+ * @deprecated Since 1.28 Use MediaWikiServices::getInstance()->getMainWANObjectCache()
*/
public static function getMainWANInstance() {
return MediaWikiServices::getInstance()->getMainWANObjectCache();
*
* @return BagOStuff
* @since 1.26
- * @deprecated Since 1.28 Use MediaWikiServices::getMainObjectStash
+ * @deprecated Since 1.28 Use MediaWikiServices::getInstance()->getMainObjectStash()
*/
public static function getMainStashInstance() {
return MediaWikiServices::getInstance()->getMainObjectStash();
/**
* Construct a new password factory.
- * Most of the time you'll want to use MediaWikiServices::getPasswordFactory instead.
+ * Most of the time you'll want to use MediaWikiServices::getInstance()->getPasswordFactory
+ * instead.
* @param array $config Mapping of password type => config
* @param string $default Default password type
* @see PasswordFactory::register