Hoo man has uploaded a new change for review.
https://gerrit.wikimedia.org/r/206077
Change subject: Remove b/c for "label" as ChangeOpsMerge ignore conflicts
......................................................................
Remove b/c for "label" as ChangeOpsMerge ignore conflicts
No longer used by any caller, API has been adopted see
c01d3ee7de75.
Change-Id: Ia21e620a80b55db0934960856022c3b1bc03e6a9
---
M repo/includes/ChangeOp/ChangeOpsMerge.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpsMergeTest.php
2 files changed, 9 insertions(+), 13 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/77/206077/1
diff --git a/repo/includes/ChangeOp/ChangeOpsMerge.php
b/repo/includes/ChangeOp/ChangeOpsMerge.php
index 4015a76..92509f6 100644
--- a/repo/includes/ChangeOp/ChangeOpsMerge.php
+++ b/repo/includes/ChangeOp/ChangeOpsMerge.php
@@ -73,7 +73,7 @@
* @param Item $fromItem
* @param Item $toItem
* @param string[] $ignoreConflicts list of elements to ignore
conflicts for
- * can only contain 'label' and or 'description' and or
'sitelink'
+ * can only contain 'description' and or 'sitelink'
* @param EntityConstraintProvider $constraintProvider
* @param ChangeOpFactoryProvider $changeOpFactoryProvider
* @param SiteLookup $siteLookup
@@ -104,19 +104,14 @@
}
/**
- * @param array $ignoreConflicts can contain strings 'label',
'description', 'sitelink'
+ * @param array $ignoreConflicts can contain strings 'description' or
'sitelink'
*
* @throws InvalidArgumentException
*/
- private function assertValidIgnoreConflictValues( $ignoreConflicts ) {
- if ( !is_array( $ignoreConflicts ) ) {
- throw new InvalidArgumentException( '$ignoreConflicts
must be an array' );
- }
-
- //TODO remove the adition of 'label' below. This was added to
allow a soft deprecation 11-12-14
- if ( array_diff( $ignoreConflicts, array_merge(
self::$conflictTypes, array( 'label' ) ) ) ) {
+ private function assertValidIgnoreConflictValues( array
$ignoreConflicts ) {
+ if ( array_diff( $ignoreConflicts, self::$conflictTypes ) ) {
throw new InvalidArgumentException(
- '$ignoreConflicts array can only contain
"label", "description" and or "sitelink" values'
+ '$ignoreConflicts array can only contain
"description" and or "sitelink" values'
);
}
}
diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpsMergeTest.php
b/repo/tests/phpunit/includes/ChangeOp/ChangeOpsMergeTest.php
index f352def..f88b38c 100644
--- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpsMergeTest.php
+++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpsMergeTest.php
@@ -114,8 +114,8 @@
array( $from, $to, array() ),
array( $from, $to, array( 'label' ) ),
array( $from, $to, array( 'description' ) ),
- array( $from, $to, array( 'description', 'label' ) ),
- array( $from, $to, array( 'description', 'label',
'sitelink' ) ),
+ array( $from, $to, array( 'description' ) ),
+ array( $from, $to, array( 'description', 'sitelink' ) ),
);
}
@@ -135,8 +135,9 @@
$from = $this->newItemWithId( 'Q111' );
$to = $this->newItemWithId( 'Q222' );
return array(
+ array( $from, $to, array( 'label' ) ),
array( $from, $to, array( 'foo' ) ),
- array( $from, $to, array( 'label', 'foo' ) ),
+ array( $from, $to, array( 'description', 'foo' ) ),
);
}
--
To view, visit https://gerrit.wikimedia.org/r/206077
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia21e620a80b55db0934960856022c3b1bc03e6a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits