From 3cfaa223fe59887e1fd2819bc703aa53ec971bfa Mon Sep 17 00:00:00 2001 From: Derick Alangi Date: Mon, 15 Apr 2019 16:21:28 +0100 Subject: [PATCH] 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 --- RELEASE-NOTES-1.34 | 2 ++ includes/registration/ExtensionRegistry.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) 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(); -- 2.20.1