Remove Title::newFromRedirectArray
authorFlorian <florian.schmidt.stargatewissen@gmail.com>
Sat, 2 Apr 2016 08:18:20 +0000 (10:18 +0200)
committerReedy <reedy@wikimedia.org>
Sat, 2 Apr 2016 13:28:37 +0000 (13:28 +0000)
Bug: T122754
Change-Id: I2cdeb98c81d4b98ea986bd2f7b23cd93c62c5930

RELEASE-NOTES-1.27
includes/Title.php
tests/phpunit/includes/content/JavaScriptContentTest.php
tests/phpunit/includes/content/TextContentTest.php

index b0d45b8..b6161da 100644 (file)
@@ -400,6 +400,7 @@ changes to languages because of Phabricator reports.
 * Article::getUndoText() and WikiPage::getUndoText were removed (deprecated since
  1.21).
 * DifferenceEngine::setText() was removed (deprecated in 1.21).
+* Title::newFromRedirectArray() was removed (deprecated in 1.21).
 
 == Compatibility ==
 
index ec17ef5..a6163f0 100644 (file)
@@ -589,23 +589,6 @@ class Title implements LinkTarget {
                return $content->getUltimateRedirectTarget();
        }
 
-       /**
-        * Extract a redirect destination from a string and return an
-        * array of Titles, or null if the text doesn't contain a valid redirect
-        * The last element in the array is the final destination after all redirects
-        * have been resolved (up to $wgMaxRedirects times)
-        *
-        * @param string $text Text with possible redirect
-        * @return Title[] Array of Titles, with the destination last
-        * @deprecated since 1.21, use Content::getRedirectChain instead.
-        */
-       public static function newFromRedirectArray( $text ) {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
-
-               $content = ContentHandler::makeContent( $text, null, CONTENT_MODEL_WIKITEXT );
-               return $content->getRedirectChain();
-       }
-
        /**
         * Get the prefixed DB key associated with an ID
         *
index 8cbbfb8..97e0b1c 100644 (file)
@@ -141,16 +141,6 @@ class JavaScriptContentTest extends TextContentTest {
                ];
        }
 
-       /**
-        * @todo Test needs database!
-        */
-       /*
-       public function getRedirectChain() {
-               $text = $this->getNativeData();
-               return Title::newFromRedirectArray( $text );
-       }
-       */
-
        /**
         * @todo Test needs database!
         */
index 93bf716..d89f3eb 100644 (file)
@@ -180,16 +180,6 @@ class TextContentTest extends MediaWikiLangTestCase {
                $this->assertEquals( !is_null( $expected ), $content->isRedirect() );
        }
 
-       /**
-        * @todo Test needs database! Should be done by a test class in the Database group.
-        */
-       /*
-       public function getRedirectChain() {
-               $text = $this->getNativeData();
-               return Title::newFromRedirectArray( $text );
-       }
-       */
-
        /**
         * @todo Test needs database! Should be done by a test class in the Database group.
         */