X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiUsageException.php;h=17655ec1c3de27737db1fc322d51bd4e5095237e;hb=e7720b8f8e09287384ddee271641d1b1721318bb;hp=9dc1f92bbc7d62c6edca0614524fdba5ca3e5262;hpb=9ac29c74edda2f457814a1ed634a19f9a44fd0a5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiUsageException.php b/includes/api/ApiUsageException.php index 9dc1f92bbc..17655ec1c3 100644 --- a/includes/api/ApiUsageException.php +++ b/includes/api/ApiUsageException.php @@ -45,6 +45,10 @@ class UsageException extends MWException { $this->mCodestr = $codestr; $this->mExtraData = $extradata; + if ( !$this instanceof ApiUsageException ) { + wfDeprecated( __METHOD__, '1.29' ); + } + // This should never happen, so throw an exception about it that will // hopefully get logged with a backtrace (T138585) if ( !is_string( $codestr ) || $codestr === '' ) { @@ -58,6 +62,7 @@ class UsageException extends MWException { * @return string */ public function getCodeString() { + wfDeprecated( __METHOD__, '1.29' ); return $this->mCodestr; } @@ -65,6 +70,7 @@ class UsageException extends MWException { * @return array */ public function getMessageArray() { + wfDeprecated( __METHOD__, '1.29' ); $result = [ 'code' => $this->mCodestr, 'info' => $this->getMessage() @@ -180,18 +186,20 @@ class ApiUsageException extends UsageException implements ILocalizedException { /** * @deprecated Do not use. This only exists here because UsageException is in * the inheritance chain for backwards compatibility. - * @inheritdoc + * @inheritDoc */ public function getCodeString() { + wfDeprecated( __METHOD__, '1.29' ); return $this->getApiMessage()->getApiCode(); } /** * @deprecated Do not use. This only exists here because UsageException is in * the inheritance chain for backwards compatibility. - * @inheritdoc + * @inheritDoc */ public function getMessageArray() { + wfDeprecated( __METHOD__, '1.29' ); $enMsg = clone $this->getApiMessage(); $enMsg->inLanguage( 'en' )->useDatabase( false ); @@ -202,7 +210,7 @@ class ApiUsageException extends UsageException implements ILocalizedException { } /** - * @inheritdoc + * @inheritDoc */ public function getMessageObject() { return $this->status->getMessage();