Merge "Fix docs for MWNamespace::clearCaches() removal"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 11 Apr 2019 23:01:28 +0000 (23:01 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 11 Apr 2019 23:01:28 +0000 (23:01 +0000)
RELEASE-NOTES-1.33
RELEASE-NOTES-1.34
includes/MWNamespace.php
includes/MediaWikiServices.php
includes/title/NamespaceInfo.php

index e28957d..db5fea0 100644 (file)
@@ -359,13 +359,6 @@ because of Phabricator reports.
 * MessageBlobStore::getBlob(), deprecated in 1.27, has been removed.
   Use ::getBlobs() instead.
 * The .background-size() LESS mixin, deprecated in 1.27, has been removed.
-* MWNamespace::clearCaches() has been removed.  So has the $rebuild parameter
-  to MWNamespace::getCanonicalNamespaces(), which was deprecated since 1.31.
-  Instead, create a new NamespaceInfo, such as by calling
-  resetServiceForTesting( 'NamespaceInfo' ) on a MediaWikiServices.
-  For classes that inherit from MediaWikiTestCase and used setMwGlobals() to
-  modify a variable that affects namespaces, caches will automatically be
-  reset and any calls to MWNamespace::clearCaches() can be removed entirely.
 * ReadOnlyMode::clearCache() and ConfiguredReadOnlyMode::clearCache() have been
   removed. Use MediaWikiTestCase::overrideMwServices() instead.
 
@@ -436,7 +429,6 @@ because of Phabricator reports.
 * Block::isValid is deprecated, since it is no longer needed in core.
 * Calling Maintenance::hasArg() as well as Maintenance::getArg() with no
   parameter has been deprecated. Please pass the argument number 0.
-* The MWNamespace class is deprecated.  Use MediaWikiServices::getNamespaceInfo.
 * ResourceLoaderContext::expandModuleNames has been deprecated.
   Use ResourceLoader::expandModuleNames instead.
 
index 07b28b3..161713b 100644 (file)
@@ -76,9 +76,17 @@ because of Phabricator reports.
   * Functions of the MWCryptRand class: singleton(), wasStrong() and generate().
 * Language::setCode, deprecated in 1.32, was removed. Use Language::factory to
   create a new Language object with a different language code.
+* MWNamespace::clearCaches() has been removed.  So has the $rebuild parameter
+  to MWNamespace::getCanonicalNamespaces(), which was deprecated since 1.31.
+  Instead, reset services, such as by calling $this->overrideMwServices() (if
+  your test extends MediaWikiTestCase). Services will generally not pick up
+  configuration changes from after they were created, so you must reset
+  services after any configuration change. Even if your code works now, it is
+  likely to break in future versions as more code is moved to services.
 * …
 
 === Deprecations in 1.34 ===
+* The MWNamespace class is deprecated. Use MediaWikiServices::getNamespaceInfo.
 * …
 
 === Other changes in 1.34 ===
index a36a12f..1529473 100644 (file)
@@ -22,7 +22,7 @@
 use MediaWiki\MediaWikiServices;
 
 /**
- * @deprecated since 1.33, use NamespaceInfo instead
+ * @deprecated since 1.34, use NamespaceInfo instead
  */
 class MWNamespace {
        /**
index c296a72..655946f 100644 (file)
@@ -667,7 +667,7 @@ class MediaWikiServices extends ServiceContainer {
        }
 
        /**
-        * @since 1.33
+        * @since 1.34
         * @return NamespaceInfo
         */
        public function getNamespaceInfo() : NamespaceInfo {
index 3726202..f9cab24 100644 (file)
@@ -24,7 +24,7 @@
  * This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of
  * them based on index.  The textual names of the namespaces are handled by Language.php.
  *
- * @since 1.33
+ * @since 1.34
  */
 class NamespaceInfo {