Page MenuHomePhorge

No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None
diff --git a/RELEASE-NOTES-1.44 b/RELEASE-NOTES-1.44
index d6a51b991eb..8e78ca6a64e 100644
--- a/RELEASE-NOTES-1.44
+++ b/RELEASE-NOTES-1.44
@@ -649,6 +649,7 @@ because of Phabricator reports.
- Xml::password() – use Html::input() instead
- Xml::buildTable() – use OOUI or Codex widgets instead
- Xml::buildTableRow() – use OOUI or Codex widgets instead
+ - Xml::textarea() – use Html::element() instead
* BlockUtils and BlockUtilsFactory is now deprecated. Use BlockTargetFactory
and CrossWikiBlockTargetFactory.
* RenameuserSQL::rename has been deprecated and should be replaced with
diff --git a/includes/xml/Xml.php b/includes/xml/Xml.php
index 0365e83ead7..4f2056f46fb 100644
--- a/includes/xml/Xml.php
+++ b/includes/xml/Xml.php
@@ -685,9 +685,11 @@ class Xml {
* @param array $attribs Any other attributes for the textarea
* @return string
*
- * @deprecated since 1.42, use {@see Html::textarea} instead
+ * @deprecated since 1.42, use {@see Html::textarea} instead; emiting deprecation warnings since 1.44
*/
public static function textarea( $name, $content, $cols = 40, $rows = 5, $attribs = [] ) {
+ wfDeprecated( __METHOD__, '1.42' );
+
return self::element( 'textarea',
[
'name' => $name,
diff --git a/tests/phpunit/includes/xml/XmlTest.php b/tests/phpunit/includes/xml/XmlTest.php
index f6becb83fdf..1b99bc7eec3 100644
--- a/tests/phpunit/includes/xml/XmlTest.php
+++ b/tests/phpunit/includes/xml/XmlTest.php
@@ -241,6 +241,7 @@ class XmlTest extends MediaWikiIntegrationTestCase {
}
public function testTextareaNoContent() {
+ $this->hideDeprecated( Xml::class . '::textarea' );
$this->assertEquals(
'<textarea name="name" id="name" cols="40" rows="5"></textarea>',
Xml::textarea( 'name', '' ),
@@ -249,6 +250,7 @@ class XmlTest extends MediaWikiIntegrationTestCase {
}
public function testTextareaAttribs() {
+ $this->hideDeprecated( Xml::class . '::textarea' );
$this->assertEquals(
'<textarea name="name" id="name" cols="20" rows="10">&lt;txt&gt;</textarea>',
Xml::textarea( 'name', '<txt>', 20, 10 ),

File Metadata

Mime Type
text/x-diff
Expires
Sat, Jul 5, 5:32 AM (11 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
227506
Default Alt Text
(2 KB)

Event Timeline