r77870 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77869‎ | r77870 | r77871 >
Date:10:09, 6 December 2010
Author:ialex
Status:ok (Comments)
Tags:
Comment:
* (bug 23119) WikiError class and subclasses are now marked as deprecated

Last usage from those classes in core was removed in r77800.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/WikiError.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/WikiError.php
@@ -33,6 +33,7 @@
3434 * @param $message string
3535 */
3636 function __construct( $message ) {
 37+ wfDeprecated( __METHOD__ );
3738 $this->mMessage = $message;
3839 }
3940
@@ -60,6 +61,7 @@
6162 * @return bool
6263 */
6364 public static function isError( $object ) {
 65+ wfDeprecated( __METHOD__ );
6466 if ( $object instanceof WikiError ) {
6567 return true;
6668 } elseif ( $object instanceof Status ) {
@@ -80,6 +82,7 @@
8183 * @param ... parameters to pass to wfMsg()
8284 */
8385 function __construct( $message/*, ... */ ) {
 86+ wfDeprecated( __METHOD__ );
8487 $args = func_get_args();
8588 array_shift( $args );
8689 $this->mMessage = wfMsgReal( $message, $args, true );
@@ -109,6 +112,7 @@
110113 * @param $offset Int
111114 */
112115 function __construct( $parser, $message = 'XML parsing error', $context = null, $offset = 0 ) {
 116+ wfDeprecated( __METHOD__ );
113117 $this->mXmlError = xml_get_error_code( $parser );
114118 $this->mColumn = xml_get_current_column_number( $parser );
115119 $this->mLine = xml_get_current_line_number( $parser );
Index: trunk/phase3/RELEASE-NOTES
@@ -459,6 +459,7 @@
460460 * Partial workaround for bug 6220: at least make files on shared repositories
461461 show up as (struck-out) bluelinks instead of redlinks on Special:WantedFiles
462462 * rebuildFileCache.php no longer creates inappropriate cache files for redirects
 463+* (bug 23119) WikiError class and subclasses are now marked as deprecated
463464
464465 === API changes in 1.17 ===
465466 * (bug 22738) Allow filtering by action type on query=logevent.

Follow-up revisions

RevisionCommit summaryAuthorDate
r780941.17: Back out r77870catrope20:44, 8 December 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r65131* part of bug 23119: removed WikiError stuff for Special:Userrights, also upd...ialex15:56, 16 April 2010
r77800Converted ImportStreamSource functions to return a Status object rather than ...ialex14:22, 5 December 2010

Comments

#Comment by Catrope (talk | contribs)   16:04, 8 December 2010

It's still used in extensions, though. Shouldn't we fix that before adding "This function is deprecated!" warnings to the 1.17 release of these extensions?

I found usages in AjaxLogin, WikiBhasa, ConfirmAccount, SemanticForms, OpenID, SocialProfile, ContactPage, ContactPageFundraiser, uniwiki and NssMySQLAuth

#Comment by Catrope (talk | contribs)   20:46, 8 December 2010

I've backed this revision out of 1.17 so the calling extensions can be fixed in trunk later.

#Comment by 😂 (talk | contribs)   23:57, 15 April 2011

This is ok for 1.18. We should fix those extensions though.

Status & tagging log