Addshore has uploaded a new change for review.
https://gerrit.wikimedia.org/r/286895
Change subject: Add wfDeprecated calls to WatchedItem
......................................................................
Add wfDeprecated calls to WatchedItem
This also requires the dependant of
Ifd6d46596ea273da73c3097aaff1487860bd6424
to be merged and rebuilt for the Wikidata repo!
Depends-On: Ifd6d46596ea273da73c3097aaff1487860bd6424
Depends-On: Ib9502202be3c73f9d3f253b310f35901e1c88cd4
Change-Id: Ib26ecd3a5f2d98472da78f2cd382153f27cb350b
---
M includes/WatchedItem.php
M tests/phpunit/includes/WatchedItemIntegrationTest.php
2 files changed, 16 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/95/286895/5
diff --git a/includes/WatchedItem.php b/includes/WatchedItem.php
index db6ce87..ba3bb5a 100644
--- a/includes/WatchedItem.php
+++ b/includes/WatchedItem.php
@@ -151,7 +151,7 @@
* or WatchedItemStore::loadWatchedItem()
*/
public static function fromUserTitle( $user, $title, $checkRights =
User::CHECK_USER_RIGHTS ) {
- // wfDeprecated( __METHOD__, '1.27' );
+ wfDeprecated( __METHOD__, '1.27' );
return new self( $user, $title,
self::DEPRECATED_USAGE_TIMESTAMP, (bool)$checkRights );
}
@@ -159,7 +159,7 @@
* @deprecated since 1.27 Use
WatchedItemStore::resetNotificationTimestamp()
*/
public function resetNotificationTimestamp( $force = '', $oldid = 0 ) {
- // wfDeprecated( __METHOD__, '1.27' );
+ wfDeprecated( __METHOD__, '1.27' );
if ( $this->checkRights && !$this->user->isAllowed(
'editmywatchlist' ) ) {
return;
}
@@ -175,7 +175,7 @@
* @deprecated since 1.27 Use WatchedItemStore::addWatchBatch()
*/
public static function batchAddWatch( array $items ) {
- // wfDeprecated( __METHOD__, '1.27' );
+ wfDeprecated( __METHOD__, '1.27' );
if ( !$items ) {
return false;
}
@@ -208,7 +208,7 @@
* @return bool
*/
public function addWatch() {
- // wfDeprecated( __METHOD__, '1.27' );
+ wfDeprecated( __METHOD__, '1.27' );
$this->user->addWatch( $this->getTitle(), $this->checkRights );
return true;
}
@@ -218,7 +218,7 @@
* @return bool
*/
public function removeWatch() {
- // wfDeprecated( __METHOD__, '1.27' );
+ wfDeprecated( __METHOD__, '1.27' );
if ( $this->checkRights && !$this->user->isAllowed(
'editmywatchlist' ) ) {
return false;
}
@@ -231,7 +231,7 @@
* @return bool
*/
public function isWatched() {
- // wfDeprecated( __METHOD__, '1.27' );
+ wfDeprecated( __METHOD__, '1.27' );
return $this->user->isWatched( $this->getTitle(),
$this->checkRights );
}
@@ -239,7 +239,7 @@
* @deprecated since 1.27 Use
WatchedItemStore::duplicateAllAssociatedEntries()
*/
public static function duplicateEntries( Title $oldTitle, Title
$newTitle ) {
- // wfDeprecated( __METHOD__, '1.27' );
+ wfDeprecated( __METHOD__, '1.27' );
$store = WatchedItemStore::getDefaultInstance();
$store->duplicateAllAssociatedEntries( $oldTitle, $newTitle );
}
diff --git a/tests/phpunit/includes/WatchedItemIntegrationTest.php
b/tests/phpunit/includes/WatchedItemIntegrationTest.php
index e536205..be22260 100644
--- a/tests/phpunit/includes/WatchedItemIntegrationTest.php
+++ b/tests/phpunit/includes/WatchedItemIntegrationTest.php
@@ -13,6 +13,14 @@
parent::setUp();
self::$users['WatchedItemIntegrationTestUser']
= new TestUser( 'WatchedItemIntegrationTestUser' );
+
+ $this->hideDeprecated( 'WatchedItem::fromUserTitle' );
+ $this->hideDeprecated( 'WatchedItem::addWatch' );
+ $this->hideDeprecated( 'WatchedItem::removeWatch' );
+ $this->hideDeprecated( 'WatchedItem::isWatched' );
+ $this->hideDeprecated(
'WatchedItem::resetNotificationTimestamp' );
+ $this->hideDeprecated( 'WatchedItem::duplicateEntries' );
+ $this->hideDeprecated( 'WatchedItem::batchAddWatch' );
}
private function getUser() {
@@ -20,6 +28,7 @@
}
public function testWatchAndUnWatchItem() {
+
$user = $this->getUser();
$title = Title::newFromText( 'WatchedItemIntegrationTestPage' );
// Cleanup after previous tests
--
To view, visit https://gerrit.wikimedia.org/r/286895
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib26ecd3a5f2d98472da78f2cd382153f27cb350b
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits