Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/263914

Change subject: Remove Revision::getRawText()
......................................................................

Remove Revision::getRawText()

Bug: T122754
Depends-On: I742f02021959587edd83a4cfb25e0338d05a8e81
Depends-On: I10283802c26b99d7e345c5c06d59c4ea24002e52
Depends-On: I6da4fab1e0e8f698b824e977dd2336e4415ae1ba
Depends-On: Ic773243325f0d58594d8c9186e4824966d0f4e0f
Change-Id: Id1cfda59e381673be99d9561c9997c0baf26d425
---
M RELEASE-NOTES-1.27
M docs/contenthandler.txt
M includes/Revision.php
M tests/phpunit/includes/RevisionStorageTest.php
M tests/phpunit/includes/RevisionTest.php
5 files changed, 2 insertions(+), 39 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/263914/1

diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index d1952c8..38c0690 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -284,6 +284,7 @@
 * FileRepo::getRootUrl() was removed (deprecated since 1.20).
 * User::generateToken() was removed (deprecated since 1.20).
 * WikiPage::getRawText() was removed (deprecated since 1.21).
+* Revision::getRawText() was removed (deprecated since 1.21).
 
 == Compatibility ==
 
diff --git a/docs/contenthandler.txt b/docs/contenthandler.txt
index 5f9a0b0..fe2c153 100644
--- a/docs/contenthandler.txt
+++ b/docs/contenthandler.txt
@@ -96,7 +96,7 @@
 
 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
diff --git a/includes/Revision.php b/includes/Revision.php
index 1d7ac72..621a810 100644
--- a/includes/Revision.php
+++ b/includes/Revision.php
@@ -1036,19 +1036,6 @@
        }
 
        /**
-        * 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
         *
         * @since 1.21
diff --git a/tests/phpunit/includes/RevisionStorageTest.php 
b/tests/phpunit/includes/RevisionStorageTest.php
index 301ec5c..a6ae594 100644
--- a/tests/phpunit/includes/RevisionStorageTest.php
+++ b/tests/phpunit/includes/RevisionStorageTest.php
@@ -313,18 +313,6 @@
        }
 
        /**
-        * @covers Revision::getRawText
-        */
-       public function testGetRawText() {
-               $this->hideDeprecated( 'Revision::getRawText' );
-
-               $orig = $this->makeRevision( array( 'text' => 'hello hello 
raw.' ) );
-               $rev = Revision::newFromId( $orig->getId() );
-
-               $this->assertEquals( 'hello hello raw.', $rev->getRawText() );
-       }
-
-       /**
         * @covers Revision::getContentModel
         */
        public function testGetContentModel() {
diff --git a/tests/phpunit/includes/RevisionTest.php 
b/tests/phpunit/includes/RevisionTest.php
index eb17588..9763b21 100644
--- a/tests/phpunit/includes/RevisionTest.php
+++ b/tests/phpunit/includes/RevisionTest.php
@@ -333,19 +333,6 @@
                $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 array(
                        array( "hello world.", CONTENT_MODEL_WIKITEXT, 12 ),

-- 
To view, visit https://gerrit.wikimedia.org/r/263914
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id1cfda59e381673be99d9561c9997c0baf26d425
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to