Remove Revision::getRawText()
authorFlorian <florian.schmidt.stargatewissen@gmail.com>
Wed, 13 Jan 2016 19:38:12 +0000 (20:38 +0100)
committerReedy <reedy@wikimedia.org>
Fri, 1 Apr 2016 18:57:35 +0000 (19:57 +0100)
Bug: T122754
Depends-On: I742f02021959587edd83a4cfb25e0338d05a8e81
Depends-On: I10283802c26b99d7e345c5c06d59c4ea24002e52
Depends-On: I6da4fab1e0e8f698b824e977dd2336e4415ae1ba
Change-Id: Id1cfda59e381673be99d9561c9997c0baf26d425

RELEASE-NOTES-1.27
docs/contenthandler.txt
includes/Revision.php
tests/phpunit/includes/RevisionStorageTest.php
tests/phpunit/includes/RevisionTest.php

index e8924ef..a882ccc 100644 (file)
@@ -379,6 +379,7 @@ changes to languages because of Phabricator reports.
 * Unit tests don't work with external PHPUnit anymore, Composer is now the only supported
   way. Run `composer install` to install it and other dev dependencies to run unit tests.
 * wl_id field added to the watchlist table.
+* Revision::getRawText() was removed (deprecated since 1.21).
 
 == Compatibility ==
 
index f1f478e..6209b14 100644 (file)
@@ -96,7 +96,7 @@ used.
 
 Most importantly, the following functions have been deprecated:
 
-* Revisions::getText() and Revisions::getRawText() is deprecated in favor Revisions::getContent()
+* Revisions::getText() is deprecated in favor Revisions::getContent()
 * WikiPage::getText() is deprecated in favor WikiPage::getContent()
 
 Also, the old Article::getContent() (which returns text) is superceded by Article::getContentObject(). However, both
index b7bb346..79cab79 100644 (file)
@@ -1035,19 +1035,6 @@ class Revision implements IDBAccessObject {
                }
        }
 
-       /**
-        * Fetch revision text without regard for view restrictions
-        *
-        * @return string
-        *
-        * @deprecated since 1.21. Instead, use Revision::getContent( Revision::RAW )
-        *                         or Revision::getSerializedData() as appropriate.
-        */
-       public function getRawText() {
-               ContentHandler::deprecated( __METHOD__, "1.21" );
-               return $this->getText( self::RAW );
-       }
-
        /**
         * Fetch original serialized data without regard for view restrictions
         *
index 0ac9c3c..7d3007b 100644 (file)
@@ -314,18 +314,6 @@ class RevisionStorageTest extends MediaWikiTestCase {
                $this->assertEquals( 'hello hello.', $rev->getContent()->getNativeData() );
        }
 
-       /**
-        * @covers Revision::getRawText
-        */
-       public function testGetRawText() {
-               $this->hideDeprecated( 'Revision::getRawText' );
-
-               $orig = $this->makeRevision( [ 'text' => 'hello hello raw.' ] );
-               $rev = Revision::newFromId( $orig->getId() );
-
-               $this->assertEquals( 'hello hello raw.', $rev->getRawText() );
-       }
-
        /**
         * @covers Revision::getContentModel
         */
index d2eb6b8..767c963 100644 (file)
@@ -333,19 +333,6 @@ class RevisionTest extends MediaWikiTestCase {
                $this->assertEquals( $expectedText, $rev->getText( $audience ) );
        }
 
-       /**
-        * @group Database
-        * @dataProvider dataGetText
-        * @covers Revision::getRawText
-        */
-       public function testGetRawText( $text, $title, $model, $format, $audience, $expectedText ) {
-               $this->hideDeprecated( 'Revision::getRawText' );
-
-               $rev = $this->newTestRevision( $text, $title, $model, $format );
-
-               $this->assertEquals( $expectedText, $rev->getRawText( $audience ) );
-       }
-
        public function dataGetSize() {
                return [
                        [ "hello world.", CONTENT_MODEL_WIKITEXT, 12 ],