Remove unused "swap" global function
authorKunal Mehta <legoktm@gmail.com>
Mon, 16 Mar 2015 07:30:41 +0000 (00:30 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 10 Apr 2015 17:07:38 +0000 (18:07 +0100)
Deprecated in 26e1e083e8bfd4, unused since r12411.

Change-Id: If328f09114ac5a5d23a300d9b0bbcd7d67e051c8

RELEASE-NOTES-1.25
includes/GlobalFunctions.php
tests/phpunit/includes/GlobalFunctions/GlobalTest.php

index 4612c45..5f0b8aa 100644 (file)
@@ -429,6 +429,7 @@ changes to languages because of Bugzilla reports.
 * All BloomCache related code has been removed. This was largely experimental.
 * $wgResourceModuleSkinStyles no longer supports per-module local or remote paths. They
   can only be set for the entire skin.
+* Removed global function swap(). (deprecated since 1.24)
 
 == Compatibility ==
 
index 3be43b3..9e81a3c 100644 (file)
@@ -2473,20 +2473,6 @@ function wfIsHHVM() {
        return defined( 'HHVM_VERSION' );
 }
 
-/**
- * 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
index dcafb73..1e30273 100644 (file)
@@ -374,24 +374,6 @@ class GlobalTest extends MediaWikiTestCase {
                }
        }
 
-       /**
-        * @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
         */