From: Derick Alangi Date: Mon, 15 Apr 2019 15:21:28 +0000 (+0100) Subject: registration: Deprecate ExtensionRegistry->load() in favor of ->queue() X-Git-Tag: 1.34.0-rc.0~1907^2 X-Git-Url: http://git.cyclocoop.org/%27.%28%24current%20%3E%202?a=commitdiff_plain;h=3cfaa223fe59887e1fd2819bc703aa53ec971bfa;p=lhc%2Fweb%2Fwiklou.git registration: Deprecate ExtensionRegistry->load() in favor of ->queue() 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 --- diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index ee1a31934e..6545a1cfd7 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -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 === diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index 2607e5ab29..fb897314f3 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -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();