D3r1ck01 has uploaded a new change for review. https://gerrit.wikimedia.org/r/238681
Change subject: Code Cleanse for use of Deprecated functions in GlobalFunctions.php ...................................................................... Code Cleanse for use of Deprecated functions in GlobalFunctions.php According to this bug on phabricator, https://phabricator.wikimedia.org/T42485, this patch is to cleanse the code base of the GlobalFunctions.php so that deprecated functions can still be used in the MediaWiki core. This patch fixes the use of some of these functions which have been maked deprecated. Change-Id: I89dcb95d574806fd62531383e0eee1d239af81dd Signed-off-by: Alangi Derick <alangider...@gmail.com> --- M includes/GlobalFunctions.php M includes/parser/ParserDiffTest.php 2 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/81/238681/1 diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 2852561..5bef635 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2344,6 +2344,7 @@ * @param bool $end */ function wfSuppressWarnings( $end = false ) { + wfDeprecated( __METHOD__, '1.26' ); MediaWiki\suppressWarnings( $end ); } @@ -2352,6 +2353,7 @@ * Restore error level to previous value */ function wfRestoreWarnings() { + wfDeprecated( __METHOD__, '1.26' ); MediaWiki\suppressWarnings( true ); } @@ -3104,6 +3106,7 @@ * @return string Unified diff of $before and $after */ function wfDiff( $before, $after, $params = '-u' ) { + wfDeprecated( __METHOD__, '1.25' ); if ( $before == $after ) { return ''; } @@ -4014,6 +4017,7 @@ * @deprecated 1.25 - use Hooks::run */ function wfRunHooks( $event, array $args = array(), $deprecatedVersion = null ) { + wfDeprecated( __METHOD__, '1.25' ); return Hooks::run( $event, $args, $deprecatedVersion ); } diff --git a/includes/parser/ParserDiffTest.php b/includes/parser/ParserDiffTest.php index 32f5d06..1b7e75a 100644 --- a/includes/parser/ParserDiffTest.php +++ b/includes/parser/ParserDiffTest.php @@ -87,7 +87,9 @@ foreach ( $this->parsers as $i => $parser ) { $resultsList[] = var_export( $results[$i], true ); } - $diff = wfDiff( $resultsList[0], $resultsList[1] ); + $diff = new Diff( explode( "\n", $resultsList[0] ), explode( "\n", $resultsList[1] ) ); + $format = new UnifiedDiffFormatter(); + $format->format( $diff ); } else { $diff = '[too many parsers]'; } @@ -96,7 +98,7 @@ $msg .= 'Arguments: ' . $this->formatArray( $args ) . "\n"; } $msg .= 'Results: ' . $this->formatArray( $results ) . "\n" . - "Diff: $diff\n"; + "Diff: " . serialize($diff) . "\n"; throw new MWException( $msg ); } return $lastResult; -- To view, visit https://gerrit.wikimedia.org/r/238681 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89dcb95d574806fd62531383e0eee1d239af81dd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: D3r1ck01 <alangider...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits