diff options
author | Doğu Abaris <abaris@null.net> | 2024-11-13 17:57:25 +0100 |
---|---|---|
committer | Bartosz Dziewoński <dziewonski@fastmail.fm> | 2024-11-21 23:09:57 +0100 |
commit | 77f5e658d7ecb4872dda27a8d5ff2d1132f001a4 (patch) | |
tree | 2b2dbac338796e47671734266d1d6e069f5a3707 /RELEASE-NOTES-1.44 | |
parent | 84af03ba741dea4152c070dc7ad6812001b92d08 (diff) | |
download | mediawikicore-77f5e658d7ecb4872dda27a8d5ff2d1132f001a4.tar.gz mediawikicore-77f5e658d7ecb4872dda27a8d5ff2d1132f001a4.zip |
includes/libs/Message: Add return type hints, update methods
Applied return type hints to improve type safety in Message classes.
Adjusted constructors to specify parameter types for consistency.
Enhanced `newFromJsonArray` in `ScalarParam`, `DataMessageValue`,
and `MessageParam` to clarify deserialization logic.
Key updates:
- Added `: string` return types for `getLangCode`, `getKey`, `dump`.
- Added `: array` return type for `getParams`, `getData`, `toJsonArray`.
- Revised `ScalarParam` JSON parsing to ensure a consistent return.
These adjustments enhance type safety across the Message classes.
Depends-On: Id7cc576693f5f1830e1d261cb13c626c901fb40f
Depends-On: I260e3f526be10f7b11e5c77a1e300590c6fc5b2b
Depends-On: I3c318273856d15407c71cb9b4ab7c23a0debb314
Change-Id: I7e50be91c01b4b70e1d1380651f001e35bd60523
Diffstat (limited to 'RELEASE-NOTES-1.44')
-rw-r--r-- | RELEASE-NOTES-1.44 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/RELEASE-NOTES-1.44 b/RELEASE-NOTES-1.44 index 3f6091e3204f..795f2c5699bb 100644 --- a/RELEASE-NOTES-1.44 +++ b/RELEASE-NOTES-1.44 @@ -116,6 +116,12 @@ because of Phabricator reports. * The MediaWiki\Message\Converter class, deprecated in 1.43, has been removed. Use MessageValue::newFromSpecifier or Message::newFromSpecifier instead (T358779). +* Return type declarations were added to methods in `includes/libs/Message`, + specifically in the `MessageSpecifier`, `ITextFormatter`, and + `IMessageFormatterFactory` interfaces. This update enhances type safety but + may require updates in any classes implementing these interfaces, including + external extensions. Extensions such as Translate, Flow, and ReadingLists + require compatibility patches to support these changes. * The ParsoidOutputAccess class marked @unstable from creation and deprecated with all of its methods in 1.43, has been removed. * IDatabase::onAtomicSectionCancel() has been removed without deprecation |