aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/language/MessageTest.php
diff options
context:
space:
mode:
authorBartosz Dziewoński <dziewonski@fastmail.fm>2024-05-28 23:39:58 +0200
committerBartosz Dziewoński <dziewonski@fastmail.fm>2024-05-28 22:03:46 +0000
commitf18362cccec27335084d35e1c2dfc1e9ddd1893c (patch)
tree46ba21d463f52c3ad1e2f53aae4dad2a410d531a /tests/phpunit/includes/language/MessageTest.php
parent29a9fd398cee4a9641aafeddc95afd0d04a219d4 (diff)
downloadmediawikicore-f18362cccec27335084d35e1c2dfc1e9ddd1893c.tar.gz
mediawikicore-f18362cccec27335084d35e1c2dfc1e9ddd1893c.zip
Deprecate Message::objectParams() and related code
This functionality was introduced in 2021 (commit 349819dc5a) to support the addition of UserGroupMembershipParam, which was never used, and no other use case appeared. Its existence is now preventing us from allowing serializing of MessageValue objects as JSON (since the parameters can't be guaranteed to be serializable). Deprecate: * method: MessageValue::objectParams() * method: Message::objectParams() * method: Message::objectParam() * class: UserGroupMembershipParam * constant: ParamType::OBJECT * Passing Stringable objects to ScalarParam Change-Id: I492edabb7ea1d75774b45eb9fd18261b39963f9f
Diffstat (limited to 'tests/phpunit/includes/language/MessageTest.php')
-rw-r--r--tests/phpunit/includes/language/MessageTest.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/phpunit/includes/language/MessageTest.php b/tests/phpunit/includes/language/MessageTest.php
index d34dfec0055f..1aa91a75456b 100644
--- a/tests/phpunit/includes/language/MessageTest.php
+++ b/tests/phpunit/includes/language/MessageTest.php
@@ -493,6 +493,8 @@ class MessageTest extends MediaWikiLangTestCase {
}
public function testUserGroupMemberParams() {
+ $this->expectDeprecationAndContinue( '/UserGroupMembershipParam/' );
+ $this->expectDeprecationAndContinue( '/objectParams/' );
$lang = $this->getServiceContainer()->getLanguageFactory()->getLanguage( 'qqx' );
$msg = new RawMessage( '$1' );
$this->setUserLang( $lang );