Update some composer dependancies
[lhc/web/wiklou.git] / includes / MediaWikiServices.php
index 22f0c63..9dbfc1b 100644 (file)
@@ -6,7 +6,6 @@ use CommentStore;
 use Config;
 use ConfigFactory;
 use CryptHKDF;
-use CryptRand;
 use DateFormatterFactory;
 use EventRelayerGroup;
 use GenderCache;
@@ -14,6 +13,8 @@ use GlobalVarConfig;
 use Hooks;
 use IBufferingStatsdDataFactory;
 use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
+use MediaWiki\Block\BlockManager;
+use MediaWiki\Block\BlockRestrictionStore;
 use MediaWiki\Http\HttpRequestFactory;
 use MediaWiki\Permissions\PermissionManager;
 use MediaWiki\Preferences\PreferencesFactory;
@@ -47,6 +48,7 @@ use ParserCache;
 use ParserFactory;
 use PasswordFactory;
 use ProxyLookup;
+use RepoGroup;
 use ResourceLoader;
 use SearchEngine;
 use SearchEngineConfig;
@@ -64,6 +66,7 @@ use Wikimedia\Services\ServiceContainer;
 use Wikimedia\Services\NoSuchServiceException;
 use MediaWiki\Interwiki\InterwikiLookup;
 use MagicWordFactory;
+use MediaWiki\Storage\PageEditStash;
 
 /**
  * Service locator for MediaWiki core services.
@@ -222,6 +225,7 @@ class MediaWikiServices extends ServiceContainer {
                }
        }
 
+       /** @noinspection PhpDocSignatureInspection */
        /**
         * Salvages the state of any salvageable service instances in $other.
         *
@@ -436,6 +440,22 @@ class MediaWikiServices extends ServiceContainer {
                return $this->getService( 'BlobStoreFactory' );
        }
 
+       /**
+        * @since 1.34
+        * @return BlockManager
+        */
+       public function getBlockManager() : BlockManager {
+               return $this->getService( 'BlockManager' );
+       }
+
+       /**
+        * @since 1.33
+        * @return BlockRestrictionStore
+        */
+       public function getBlockRestrictionStore() : BlockRestrictionStore {
+               return $this->getService( 'BlockRestrictionStore' );
+       }
+
        /**
         * Returns the Config object containing the bootstrap configuration.
         * Bootstrap configuration would typically include database credentials
@@ -517,16 +537,6 @@ class MediaWikiServices extends ServiceContainer {
                return $this->getService( 'CryptHKDF' );
        }
 
-       /**
-        * @since 1.28
-        * @deprecated since 1.32, use random_bytes()/random_int()
-        * @return CryptRand
-        */
-       public function getCryptRand() {
-               wfDeprecated( __METHOD__, '1.32' );
-               return $this->getService( 'CryptRand' );
-       }
-
        /**
         * @since 1.33
         * @return DateFormatterFactory
@@ -678,7 +688,7 @@ class MediaWikiServices extends ServiceContainer {
        }
 
        /**
-        * @since 1.33
+        * @since 1.34
         * @return NamespaceInfo
         */
        public function getNamespaceInfo() : NamespaceInfo {
@@ -701,6 +711,14 @@ class MediaWikiServices extends ServiceContainer {
                return $this->getService( 'OldRevisionImporter' );
        }
 
+       /**
+        * @return PageEditStash
+        * @since 1.34
+        */
+       public function getPageEditStash() {
+               return $this->getService( 'PageEditStash' );
+       }
+
        /**
         * @since 1.29
         * @return Parser
@@ -773,6 +791,14 @@ class MediaWikiServices extends ServiceContainer {
                return $this->getService( 'ReadOnlyMode' );
        }
 
+       /**
+        * @since 1.34
+        * @return RepoGroup
+        */
+       public function getRepoGroup() : RepoGroup {
+               return $this->getService( 'RepoGroup' );
+       }
+
        /**
         * @since 1.33
         * @return ResourceLoader