Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/197001
Change subject: Remove unused "swap" global function
......................................................................
Remove unused "swap" global function
Deprecated in 26e1e083e8bfd4, unused since r12411.
Change-Id: If328f09114ac5a5d23a300d9b0bbcd7d67e051c8
---
M RELEASE-NOTES-1.25
M includes/GlobalFunctions.php
M tests/phpunit/includes/GlobalFunctions/GlobalTest.php
3 files changed, 1 insertion(+), 32 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/01/197001/1
diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25
index 5e08efd..6b60c63 100644
--- a/RELEASE-NOTES-1.25
+++ b/RELEASE-NOTES-1.25
@@ -405,6 +405,7 @@
* EditPage::attemptSave has been modified not to call handleStatus itself and
instead just returns the Status object. Extension calling it should be aware
of
this.
+* The unused "swap" global function was removed.
== Compatibility ==
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 9ae6cb8..2664faa 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -2510,20 +2510,6 @@
}
/**
- * Swap two variables
- *
- * @deprecated since 1.24
- * @param mixed $x
- * @param mixed $y
- */
-function swap( &$x, &$y ) {
- wfDeprecated( __FUNCTION__, '1.24' );
- $z = $x;
- $x = $y;
- $y = $z;
-}
-
-/**
* Tries to get the system directory for temporary files. First
* $wgTmpDirectory is checked, and then the TMPDIR, TMP, and TEMP
* environment variables are then checked in sequence, and if none are
diff --git a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
index dcafb73..1e30273 100644
--- a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
+++ b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
@@ -375,24 +375,6 @@
}
/**
- * @covers ::swap
- */
- public function testSwapVarsTest() {
- $this->hideDeprecated( 'swap' );
-
- $var1 = 1;
- $var2 = 2;
-
- $this->assertEquals( $var1, 1, 'var1 is set originally' );
- $this->assertEquals( $var2, 2, 'var1 is set originally' );
-
- swap( $var1, $var2 );
-
- $this->assertEquals( $var1, 2, 'var1 is swapped' );
- $this->assertEquals( $var2, 1, 'var2 is swapped' );
- }
-
- /**
* @covers ::wfPercent
*/
public function testWfPercentTest() {
--
To view, visit https://gerrit.wikimedia.org/r/197001
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If328f09114ac5a5d23a300d9b0bbcd7d67e051c8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits