From 24a4484ec44cd1b5a9d9863819d7e678cd4b9a78 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Tue, 8 Mar 2016 08:40:18 +0100 Subject: [PATCH] Remove deprecated methods in ApiQuery No more uses found in core or Gerrit extensions for the following methods: * ApiQuery::getGenerators() was removed (deprecated since 1.21). * ApiQuery::getModuleType() was removed (deprecated since 1.21). * ApiQuery::setGeneratorContinue() was removed (deprecated since 1.24). Change-Id: I1d46adc9ecad598c7d7726a2243bba4f7a04531a --- RELEASE-NOTES-1.27 | 3 +++ includes/api/ApiQuery.php | 43 --------------------------------------- 2 files changed, 3 insertions(+), 43 deletions(-) diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 437f8e660b..2e90a55bd6 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -217,7 +217,10 @@ HHVM 3.1. ApiQueryBase::keyPartToTitle() all removed (deprecated since 1.24). * ApiQueryBase::checkRowCount() was removed (deprecated since 1.24). * ApiQueryBase::getDirectionDescription() was removed (deprecated since 1.25). +* ApiQuery::getGenerators() was removed (deprecated since 1.21). * ApiQuery::getModules() was removed (deprecated since 1.21). +* ApiQuery::getModuleType() was removed (deprecated since 1.21). +* ApiQuery::setGeneratorContinue() was removed (deprecated since 1.24). * ApiMain::getModules() was removed (deprecated since 1.21). * ApiBase::getVersion() was removed (deprecated since 1.21). diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index 58b670a2b4..43369074ea 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -185,33 +185,6 @@ class ApiQuery extends ApiBase { return $this->mPageSet; } - /** - * Get the generators array mapping module names to class names - * @deprecated since 1.21, list of generators is maintained by ApiPageSet - * @return array Array(modulename => classname) - */ - public function getGenerators() { - wfDeprecated( __METHOD__, '1.21' ); - $gens = []; - foreach ( $this->mModuleMgr->getNamesWithClasses() as $name => $class ) { - if ( is_subclass_of( $class, 'ApiQueryGeneratorBase' ) ) { - $gens[$name] = $class; - } - } - - return $gens; - } - - /** - * Get whether the specified module is a prop, list or a meta query module - * @deprecated since 1.21, use getModuleManager()->getModuleGroup() - * @param string $moduleName Name of the module to find type for - * @return string|null - */ - function getModuleType( $moduleName ) { - return $this->getModuleManager()->getModuleGroup( $moduleName ); - } - /** * @return ApiFormatRaw|null */ @@ -451,22 +424,6 @@ class ApiQuery extends ApiBase { } } - /** - * This method is called by the generator base when generator in the smart-continue - * mode tries to set 'query-continue' value. ApiQuery stores those values separately - * until the post-processing when it is known if the generation should continue or repeat. - * @deprecated since 1.24 - * @param ApiQueryGeneratorBase $module Generator module - * @param string $paramName - * @param mixed $paramValue - * @return bool True if processed, false if this is a legacy continue - */ - public function setGeneratorContinue( $module, $paramName, $paramValue ) { - wfDeprecated( __METHOD__, '1.24' ); - $this->getContinuationManager()->addGeneratorContinueParam( $module, $paramName, $paramValue ); - return !$this->getParameter( 'rawcontinue' ); - } - /** * @param ApiPageSet $pageSet Pages to be exported * @param ApiResult $result Result to output to -- 2.20.1