SearchEngine: Remove deprecated unused method `transformSearchTerm()`
authorDerick Alangi <alangiderick@gmail.com>
Sat, 11 May 2019 15:21:18 +0000 (16:21 +0100)
committerJames D. Forrester <jforrester@wikimedia.org>
Mon, 13 May 2019 14:37:00 +0000 (15:37 +0100)
I've checked around with code search tool and realized that SMW has
its own implementation of `transformSearchTerm()` which overwrites the
implementation of this method from core as it extends SearchEngine.

So removing this won't break SMW, see usage below;

Usage
=====

https://codesearch.wmflabs.org/search/?q=%5CbtransformSearchTerm%5Cb&i=nope&files=&repos=

Bug: T220656
Change-Id: I3dbe04ecba07700167c894673e23c1eead95460f

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

index db24a44..247f48e 100644 (file)
@@ -156,6 +156,7 @@ because of Phabricator reports.
 * ChangeTags::purgeTagUsageCache(), deprecated in 1.33, has been removed.
 * JobQueueGroup::pushLazyJobs(), deprecated in 1.33, has been removed.
 * MediaWikiTestCase::stashMwGlobals(), deprecated in 1.32, has been removed.
+* SearchEngine::transformSearchTerm(), deprecated in 1.32, has been removed.
 * …
 
 === Deprecations in 1.34 ===
index b99c0d3..9771e88 100644 (file)
@@ -235,20 +235,6 @@ abstract class SearchEngine {
                return MediaWikiServices::getInstance()->getContentLanguage()->segmentByWord( $string );
        }
 
-       /**
-        * Transform search term in cases when parts of the query came as different
-        * GET params (when supported), e.g. for prefix queries:
-        * search=test&prefix=Main_Page/Archive -> test prefix:Main Page/Archive
-        * @param string $term
-        * @return string
-        * @deprecated since 1.32 this should now be handled internally by the
-        * search engine
-        */
-       public function transformSearchTerm( $term ) {
-               wfDeprecated( __METHOD__, '1.32' );
-               return $term;
-       }
-
        /**
         * Get service class to finding near matches.
         * @param Config $config Configuration to use for the matcher.