diff options
author | Bartosz DziewoĆski <dziewonski@fastmail.fm> | 2024-10-21 19:29:57 +0200 |
---|---|---|
committer | Krinkle <krinkle@fastmail.com> | 2024-10-23 19:18:06 +0000 |
commit | cdb17bf95e190b3a09c639c8146f1e45ea60fa9c (patch) | |
tree | 8bb48fbef5d87f3d9fe17877c25c0e9de424feaf /includes/Rest/Handler/ActionModuleBasedHandler.php | |
parent | 1a318c94996be1a826d5ae5cadf8280c0b45b43b (diff) | |
download | mediawikicore-cdb17bf95e190b3a09c639c8146f1e45ea60fa9c.tar.gz mediawikicore-cdb17bf95e190b3a09c639c8146f1e45ea60fa9c.zip |
Replace uses of deprecated MediaWiki\Message\Converter
The converter is no longer needed now that Message and MessageValue
use the same internal format for the message parameters.
Bug: T358779
Depends-On: I625a48a6ecd3fad5c2ed76b23343a0fef91e1b83
Change-Id: I41392aca4ae6b40f3476397d7ca37ba6cadb2ae4
Diffstat (limited to 'includes/Rest/Handler/ActionModuleBasedHandler.php')
-rw-r--r-- | includes/Rest/Handler/ActionModuleBasedHandler.php | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/includes/Rest/Handler/ActionModuleBasedHandler.php b/includes/Rest/Handler/ActionModuleBasedHandler.php index b4b398cb52b5..ed5d798944a1 100644 --- a/includes/Rest/Handler/ActionModuleBasedHandler.php +++ b/includes/Rest/Handler/ActionModuleBasedHandler.php @@ -209,7 +209,7 @@ abstract class ActionModuleBasedHandler extends Handler { // override to supply mappings throw new LocalizedHttpException( - $this->makeMessageValue( $msg ), + MessageValue::newFromSpecifier( $msg ), $statusCode, // Include the original error code in the response. // This makes it easier to track down the original cause of the error, @@ -220,15 +220,4 @@ abstract class ActionModuleBasedHandler extends Handler { ); } - /** - * Constructs a MessageValue from an IApiMessage. - * - * @param IApiMessage $msg - * - * @return MessageValue - */ - protected function makeMessageValue( IApiMessage $msg ) { - return $this->getMessageValueConverter()->convertMessage( $msg ); - } - } |