From 7d1d48ed5f8cae8acb34ccf9046788ebd05cc052 Mon Sep 17 00:00:00 2001 From: David Causse Date: Thu, 1 Aug 2019 17:06:50 +0200 Subject: [PATCH] Break the cyclic dependency between SearchEngine and SearchResult Change-Id: Icda469eb675ccac6048d7a9d978d51e3e673edab --- RELEASE-NOTES-1.34 | 3 +++ includes/search/SearchResult.php | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index 9a4aeb38f9..6e789487be 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -345,6 +345,9 @@ because of Phabricator reports. dropped. * MessageCache::destroyInstance() has been removed. Instead, call MediaWikiTestCase::resetServices(). +* SearchResult protected field $searchEngine is removed and no longer + initialized after calling SearchResult::initFromTitle(). +* … === Deprecations in 1.34 === * The MWNamespace class is deprecated. Use NamespaceInfo. diff --git a/includes/search/SearchResult.php b/includes/search/SearchResult.php index b924b29cff..1954e85c7e 100644 --- a/includes/search/SearchResult.php +++ b/includes/search/SearchResult.php @@ -51,11 +51,6 @@ class SearchResult { */ protected $mText; - /** - * @var SearchEngine - */ - protected $searchEngine; - /** * A function returning a set of extension data. * @var Closure|null @@ -96,7 +91,6 @@ class SearchResult { $this->mImage = $services->getRepoGroup()->findFile( $this->mTitle ); } } - $this->searchEngine = $services->newSearchEngine(); } /** -- 2.20.1