registration: Deprecate ExtensionRegistry->load() in favor of ->queue()
authorDerick Alangi <alangiderick@gmail.com>
Mon, 15 Apr 2019 15:21:28 +0000 (16:21 +0100)
committerDerick Alangi <alangiderick@gmail.com>
Fri, 19 Apr 2019 18:07:23 +0000 (19:07 +0100)
Per task description, Legoktm says "should be safe to hard deprecate in
1.34", hence, doing so and skipping soft deprecation stage.

Bug: T220996
Change-Id: I5669a06f466787df24ce89e58baeed204f848e17

RELEASE-NOTES-1.34
includes/registration/ExtensionRegistry.php

index ee1a319..6545a1c 100644 (file)
@@ -103,6 +103,8 @@ because of Phabricator reports.
 
 === Deprecations in 1.34 ===
 * The MWNamespace class is deprecated. Use MediaWikiServices::getNamespaceInfo.
+* ExtensionRegistry->load() is deprecated, as it breaks dependency checking.
+  Instead, use ->queue().
 * …
 
 === Other changes in 1.34 ===
index 2607e5a..fb89731 100644 (file)
@@ -413,10 +413,12 @@ class ExtensionRegistry {
         *
         * If some extensions are already queued, this will load
         * those as well.
-        *
+        * TODO: Remove in MediaWiki 1.35
+        * @deprecated since 1.34, use ExtensionRegistry->queue() instead
         * @param string $path Absolute path to the JSON file
         */
        public function load( $path ) {
+               wfDeprecated( __METHOD__, '1.34' );
                $this->loadFromQueue(); // First clear the queue
                $this->queue( $path );
                $this->loadFromQueue();