[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Article::getAutosummary() and WikiPage::getAutosummary() wer...
jenkins-bot has submitted this change and it was merged. Change subject: Article::getAutosummary() and WikiPage::getAutosummary() were removed .. Article::getAutosummary() and WikiPage::getAutosummary() were removed Bug: T145728 Change-Id: I233571658b902c93a148a992ea99eb159551e732 --- M RELEASE-NOTES-1.29 M includes/page/Article.php M includes/page/WikiPage.php M tests/phpunit/includes/page/ArticleTest.php M tests/phpunit/includes/page/WikiPageTest.php 5 files changed, 2 insertions(+), 95 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29 index caa35ef..ab7cdd4 100644 --- a/RELEASE-NOTES-1.29 +++ b/RELEASE-NOTES-1.29 @@ -62,6 +62,8 @@ * Xml::escapeJsString() (deprecated in 1.21) was removed. * Article::getText() and Article::prepareTextForEdit() (deprecated in 1.21) were removed. +* Article::getAutosummary() and WikiPage::getAutosummary (deprecated in 1.21) + were removed. == Compatibility == diff --git a/includes/page/Article.php b/includes/page/Article.php index ac363b2..d30f034 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -2725,15 +2725,5 @@ WikiPage::onArticleEdit( $title ); } - /** -* @param string $oldtext -* @param string $newtext -* @param int $flags -* @return string -* @deprecated since 1.21, use ContentHandler::getAutosummary() instead -*/ - public static function getAutosummary( $oldtext, $newtext, $flags ) { - return WikiPage::getAutosummary( $oldtext, $newtext, $flags ); - } // ** } diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index f016494..284a343 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -3520,28 +3520,6 @@ } /** -* Return an applicable autosummary if one exists for the given edit. -* @param string|null $oldtext The previous text of the page. -* @param string|null $newtext The submitted text of the page. -* @param int $flags Bitmask: a bitmask of flags submitted for the edit. -* @return string An appropriate autosummary, or an empty string. -* -* @deprecated since 1.21, use ContentHandler::getAutosummary() instead -*/ - public static function getAutosummary( $oldtext, $newtext, $flags ) { - // NOTE: stub for backwards-compatibility. assumes the given text is - // wikitext. will break horribly if it isn't. - - wfDeprecated( __METHOD__, '1.21' ); - - $handler = ContentHandler::getForModelID( CONTENT_MODEL_WIKITEXT ); - $oldContent = is_null( $oldtext ) ? null : $handler->unserializeContent( $oldtext ); - $newContent = is_null( $newtext ) ? null : $handler->unserializeContent( $newtext ); - - return $handler->getAutosummary( $oldContent, $newContent, $flags ); - } - - /** * Auto-generates a deletion reason * * @param bool &$hasHistory Whether the page has a history diff --git a/tests/phpunit/includes/page/ArticleTest.php b/tests/phpunit/includes/page/ArticleTest.php index a96a296..7d0813d 100644 --- a/tests/phpunit/includes/page/ArticleTest.php +++ b/tests/phpunit/includes/page/ArticleTest.php @@ -63,13 +63,9 @@ * @covers Article::onArticleCreate * @covers Article::onArticleDelete * @covers Article::onArticleEdit -* @covers Article::getAutosummary */ public function testStaticFunctions() { $this->hideDeprecated( 'Article::selectFields' ); - $this->hideDeprecated( 'Article::getAutosummary' ); - $this->hideDeprecated( 'WikiPage::getAutosummary' ); - $this->hideDeprecated( 'CategoryPage::getAutosummary' ); // Inherited from Article $this->assertEquals( WikiPage::selectFields(), Article::selectFields(), "Article static functions" ); @@ -78,8 +74,6 @@ $this->assertEquals( true, is_callable( "Article::onArticleDelete" ), "Article static functions" ); $this->assertEquals( true, is_callable( "ImagePage::onArticleEdit" ), - "Article static functions" ); - $this->assertTrue( is_string( CategoryPage::getAutosummary( '', '', 0 ) ), "Article static functions" ); } } diff --git a/tests/phpunit/includes/page/WikiPageTest.php b/tests/phpunit/includes/page/WikiPageTest.php index 4b7ebd3..49d9fd2 100644 --- a/tests/phpunit/includes/page/WikiPageTest.php +++ b/tests/phpunit/includes/page/WikiPageTest.php @@ -1034,63 +1034,6 @@ $this->assertEquals( "one", $page->getContent()->getNativeData() ); } -
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Article::getAutosummary() and WikiPage::getAutosummary() wer...
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/324705 Change subject: Article::getAutosummary() and WikiPage::getAutosummary() were removed .. Article::getAutosummary() and WikiPage::getAutosummary() were removed Bug: T145728 Change-Id: I233571658b902c93a148a992ea99eb159551e732 --- M RELEASE-NOTES-1.29 M includes/page/Article.php M includes/page/WikiPage.php M tests/phpunit/includes/page/ArticleTest.php M tests/phpunit/includes/page/WikiPageTest.php 5 files changed, 4 insertions(+), 95 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/05/324705/1 diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29 index 21a94c5..dcad6ac 100644 --- a/RELEASE-NOTES-1.29 +++ b/RELEASE-NOTES-1.29 @@ -58,6 +58,10 @@ required as all sessions are stored in Object Cache now. * MWHttpRequest::execute() should be considered to return a StatusValue; the Status return type is deprecated. +* WikiRevision::getText(), Article::getText() and Article::prepareTextForEdit() + (deprecated in 1.21) were removed. +* Article::getAutosummary() and WikiPage::getAutosummary (deprecated in 1.21) + were removed. == Compatibility == diff --git a/includes/page/Article.php b/includes/page/Article.php index ac363b2..d30f034 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -2725,15 +2725,5 @@ WikiPage::onArticleEdit( $title ); } - /** -* @param string $oldtext -* @param string $newtext -* @param int $flags -* @return string -* @deprecated since 1.21, use ContentHandler::getAutosummary() instead -*/ - public static function getAutosummary( $oldtext, $newtext, $flags ) { - return WikiPage::getAutosummary( $oldtext, $newtext, $flags ); - } // ** } diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index f016494..284a343 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -3520,28 +3520,6 @@ } /** -* Return an applicable autosummary if one exists for the given edit. -* @param string|null $oldtext The previous text of the page. -* @param string|null $newtext The submitted text of the page. -* @param int $flags Bitmask: a bitmask of flags submitted for the edit. -* @return string An appropriate autosummary, or an empty string. -* -* @deprecated since 1.21, use ContentHandler::getAutosummary() instead -*/ - public static function getAutosummary( $oldtext, $newtext, $flags ) { - // NOTE: stub for backwards-compatibility. assumes the given text is - // wikitext. will break horribly if it isn't. - - wfDeprecated( __METHOD__, '1.21' ); - - $handler = ContentHandler::getForModelID( CONTENT_MODEL_WIKITEXT ); - $oldContent = is_null( $oldtext ) ? null : $handler->unserializeContent( $oldtext ); - $newContent = is_null( $newtext ) ? null : $handler->unserializeContent( $newtext ); - - return $handler->getAutosummary( $oldContent, $newContent, $flags ); - } - - /** * Auto-generates a deletion reason * * @param bool &$hasHistory Whether the page has a history diff --git a/tests/phpunit/includes/page/ArticleTest.php b/tests/phpunit/includes/page/ArticleTest.php index a96a296..7d0813d 100644 --- a/tests/phpunit/includes/page/ArticleTest.php +++ b/tests/phpunit/includes/page/ArticleTest.php @@ -63,13 +63,9 @@ * @covers Article::onArticleCreate * @covers Article::onArticleDelete * @covers Article::onArticleEdit -* @covers Article::getAutosummary */ public function testStaticFunctions() { $this->hideDeprecated( 'Article::selectFields' ); - $this->hideDeprecated( 'Article::getAutosummary' ); - $this->hideDeprecated( 'WikiPage::getAutosummary' ); - $this->hideDeprecated( 'CategoryPage::getAutosummary' ); // Inherited from Article $this->assertEquals( WikiPage::selectFields(), Article::selectFields(), "Article static functions" ); @@ -78,8 +74,6 @@ $this->assertEquals( true, is_callable( "Article::onArticleDelete" ), "Article static functions" ); $this->assertEquals( true, is_callable( "ImagePage::onArticleEdit" ), - "Article static functions" ); - $this->assertTrue( is_string( CategoryPage::getAutosummary( '', '', 0 ) ), "Article static functions" ); } } diff --git a/tests/phpunit/includes/page/WikiPageTest.php b/tests/phpunit/includes/page/WikiPageTest.php index 4b7ebd3..49d9fd2 100644 --- a/tests/phpunit/includes/page/WikiPageTest.php