Break the cyclic dependency between SearchEngine and SearchResult
authorDavid Causse <dcausse@wikimedia.org>
Thu, 1 Aug 2019 15:06:50 +0000 (17:06 +0200)
committerDavid Causse <dcausse@wikimedia.org>
Tue, 20 Aug 2019 16:24:44 +0000 (18:24 +0200)
Change-Id: Icda469eb675ccac6048d7a9d978d51e3e673edab

RELEASE-NOTES-1.34
includes/search/SearchResult.php

index 9a4aeb3..6e78948 100644 (file)
@@ -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.
index b924b29..1954e85 100644 (file)
@@ -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();
        }
 
        /**