mw.user.getPageviewToken to better capture its function.
* Passing Revision objects to ContentHandler::getUndoContent() is deprecated,
Content object should be passed instead.
+* (T197179) Parameters 'notice', 'notice-messages', 'notice-message',
+ previously used by OOUI HTMLForm fields, are now deprecated. Use
+ 'help', 'help-message', 'help-messages' instead.
+* (T197179) HTMLFormField::getNotices() is now deprecated.
=== Other changes in 1.32 ===
* (T198811) The following tables have had their UNIQUE indexes turned into
* 'help-inline' -- Whether help text (defined using options above) will be shown
* inline after the input field, rather than in a popup.
* Defaults to true. Only used by OOUI form fields.
- * 'notice' -- message text for a message to use as a notice in the field.
- * Currently used by OOUI form fields only.
- * 'notice-messages' -- array of message keys/objects to use for notice.
- * Overrides 'notice'.
- * 'notice-message' -- message key or object to use as a notice.
+ * 'notice' -- (deprecated, use 'help' instead)
+ * 'notice-messages' -- (deprecated, use 'help-messages' instead)
+ * 'notice-message' -- (deprecated, use 'help-message' instead)
* 'required' -- passed through to the object, indicating that it
* is a required field.
* 'size' -- the length of text fields
if ( isset( $params['hide-if'] ) ) {
$this->mHideIf = $params['hide-if'];
}
+
+ if ( isset( $this->mParams['notice-message'] ) ) {
+ wfDeprecated( "'notice-message' parameter in HTMLForm", '1.32' );
+ }
+ if ( isset( $this->mParams['notice-messages'] ) ) {
+ wfDeprecated( "'notice-messages' parameter in HTMLForm", '1.32' );
+ }
+ if ( isset( $this->mParams['notice'] ) ) {
+ wfDeprecated( "'notice' parameter in HTMLForm", '1.32' );
+ }
}
/**
$error = new OOUI\HtmlSnippet( $error );
}
- $notices = $this->getNotices();
+ $notices = $this->getNotices( 'skip deprecation' );
foreach ( $notices as &$notice ) {
$notice = new OOUI\HtmlSnippet( $notice );
}
* Determine notices to display for the field.
*
* @since 1.28
+ * @deprecated since 1.32
+ * @param string $skipDeprecation Pass 'skip deprecation' to avoid the deprecation
+ * warning (since 1.32)
* @return string[]
*/
- public function getNotices() {
+ public function getNotices( $skipDeprecation = null ) {
+ if ( $skipDeprecation !== 'skip deprecation' ) {
+ wfDeprecated( __METHOD__, '1.32' );
+ }
+
$notices = [];
if ( isset( $this->mParams['notice-message'] ) ) {