From: Bartosz DziewoƄski Date: Tue, 2 Oct 2018 21:22:00 +0000 (+0200) Subject: HTMLInfoField: Undo breaking change, deprecate instead, add release notes X-Git-Tag: 1.34.0-rc.0~3825 X-Git-Url: http://git.cyclocoop.org/%22%22._DIR_PLUGIN_FULLCALENDAR.%22prive/themes/spip/images/event_edit.png/%5B%27/%22.find_in_path%28?a=commitdiff_plain;h=c9b599ababfa270fa1c8dcf25600c1c0448b03e7;p=lhc%2Fweb%2Fwiklou.git HTMLInfoField: Undo breaking change, deprecate instead, add release notes Follow-up to e6eb87ae2028d9d3f9317d75cced42511ed97b9e. Bug: T203202 Bug: T205956 Change-Id: I2d19d376d218c59e4ea36e8635e883afac2adea6 --- diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index affa83db40..2375b9014c 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -501,6 +501,11 @@ because of Phabricator reports. RevisionArchiveRecord, RevisionFactory, RevisionLookup, RevisionRecord, RevisionSlots, RevisionStore, RevisionStoreRecord, SlotRecord, and SuppressedDataException. +* When using OOUI HTMLForm containing an 'info' field which uses the 'rawrow' + option, it is now deprecated to give its contents (the 'default' option) + as a string. They should be given as a OOUI\FieldLayout object instead. + Notably, this affects fields defined in the 'GetPreferences' hook, because + Special:Preferences uses an OOUI form now. (If possible, don't use 'rawrow'.) === Other changes in 1.32 === * (T198811) The following tables have had their UNIQUE indexes turned into diff --git a/includes/htmlform/fields/HTMLInfoField.php b/includes/htmlform/fields/HTMLInfoField.php index a98f11289d..c0dbf500d2 100644 --- a/includes/htmlform/fields/HTMLInfoField.php +++ b/includes/htmlform/fields/HTMLInfoField.php @@ -83,7 +83,8 @@ class HTMLInfoField extends HTMLFormField { public function getOOUI( $value ) { if ( !empty( $this->mParams['rawrow'] ) ) { if ( !( $value instanceof OOUI\FieldLayout ) ) { - throw new Exception( "'default' must be a FieldLayout or subclass when using 'rawrow'" ); + wfDeprecated( "'default' parameter as a string when using 'rawrow' " . + "(must be a FieldLayout or subclass)", '1.32' ); } return $value; }