[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Remove support for old API output format

2017-10-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385388 )

Change subject: Remove support for old API output format
..


Remove support for old API output format

Bug: T168532
Change-Id: Idc30ec9ea01101c6a4baaa609eca34bb9c6832a6
---
M extension.json
M includes/ConstraintCheck/Context/ApiV2Context.php
D includes/ConstraintCheck/Context/StatementContext.php
M includes/ConstraintCheck/DelegatingConstraintChecker.php
M includes/ConstraintReportFactory.php
M tests/phpunit/Checker/CommonsLinkChecker/CommonsLinkCheckerTest.php
M tests/phpunit/Checker/ConnectionChecker/ConflictsWithCheckerTest.php
M tests/phpunit/Checker/ConnectionChecker/InverseCheckerTest.php
M tests/phpunit/Checker/ConnectionChecker/ItemCheckerTest.php
M tests/phpunit/Checker/ConnectionChecker/SymmetricCheckerTest.php
M tests/phpunit/Checker/ConnectionChecker/TargetRequiredClaimCheckerTest.php
M tests/phpunit/Checker/FormatChecker/FormatCheckerTest.php
M tests/phpunit/Checker/OneOfChecker/OneOfCheckerTest.php
M tests/phpunit/Checker/QualifierChecker/MandatoryQualifiersCheckerTest.php
M tests/phpunit/Checker/QualifierChecker/QualifierCheckerTest.php
M tests/phpunit/Checker/QualifierChecker/QualifiersCheckerTest.php
M tests/phpunit/Checker/RangeChecker/DiffWithinRangeCheckerTest.php
M tests/phpunit/Checker/RangeChecker/RangeCheckerTest.php
M tests/phpunit/Checker/ReferenceCheckerTest.php
M tests/phpunit/Checker/TypeChecker/TypeCheckerTest.php
M tests/phpunit/Checker/TypeChecker/ValueTypeCheckerTest.php
M tests/phpunit/Checker/ValueCountChecker/MultiValueCheckerTest.php
M tests/phpunit/Checker/ValueCountChecker/SingleValueCheckerTest.php
M tests/phpunit/Checker/ValueCountChecker/UniqueValueCheckerTest.php
M tests/phpunit/Checker/ValueOnlyCheckerTest.php
D tests/phpunit/Context/StatementContextTest.php
M tests/phpunit/Helper/ConstraintParameterParserTest.php
M tests/phpunit/Helper/LoggingHelperTest.php
28 files changed, 117 insertions(+), 357 deletions(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extension.json b/extension.json
index 7dbb153..eb3ba73 100644
--- a/extension.json
+++ b/extension.json
@@ -124,19 +124,14 @@
"description": "Whether to import property constraint 
statements into the constraint database or not.",
"public": true
},
-   "WBQualityConstraintsNewApiOutputFormat": {
-   "value": true,
-   "description": "Whether to use the new API output 
format, based on the Wikibase entity JSON format, which can accommodate 
constraint results on qualifiers and references.",
-   "public": true
-   },
"WBQualityConstraintsCheckQualifiers": {
"value": false,
-   "description": "Whether to check constraints on 
qualifiers. Requires the new API output format (otherwise ignored).",
+   "description": "Whether to check constraints on 
qualifiers.",
"public": true
},
"WBQualityConstraintsCheckReferences": {
"value": false,
-   "description": "Whether to check constraints on 
references. Requires the new API output format (otherwise ignored).",
+   "description": "Whether to check constraints on 
references.",
"public": true
},
"WBQualityConstraintsSparqlEndpoint": {
diff --git a/includes/ConstraintCheck/Context/ApiV2Context.php 
b/includes/ConstraintCheck/Context/ApiV2Context.php
index 5ac66e9..b693b10 100644
--- a/includes/ConstraintCheck/Context/ApiV2Context.php
+++ b/includes/ConstraintCheck/Context/ApiV2Context.php
@@ -4,6 +4,7 @@
 
 /**
  * Abstract superclass of all contexts for the second version of the API 
output format.
+ * (This is currently the only supported format.)
  *
  * This output format is modeled after the Wikibase entity JSON format,
  * where an object with the members 'hash' and a list of 'reports' can appear
diff --git a/includes/ConstraintCheck/Context/StatementContext.php 
b/includes/ConstraintCheck/Context/StatementContext.php
deleted file mode 100644
index 2968a0d..000
--- a/includes/ConstraintCheck/Context/StatementContext.php
+++ /dev/null
@@ -1,76 +0,0 @@
-getMainSnak() );
-   $this->statement = $statement;
-   }
-
-   public function getType() {
-   return self::TYPE_STATEMENT;
-   }
-
-   public function getSnakRank() {
-   return $this->statement->getRank();
-   }
-
-   public function getSnakStatement() {
-   return $this->statement;
-   }
-
-   /**
-* The $container is keyed by entity ID, then by property ID,
-* then by claim ID, and then contains the 

[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Remove support for old API output format

2017-10-20 Thread Lucas Werkmeister (WMDE) (Code Review)
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/385388 )

Change subject: Remove support for old API output format
..

Remove support for old API output format

Bug: T168532
Change-Id: Idc30ec9ea01101c6a4baaa609eca34bb9c6832a6
---
M extension.json
M includes/ConstraintCheck/Context/ApiV2Context.php
D includes/ConstraintCheck/Context/StatementContext.php
M includes/ConstraintCheck/DelegatingConstraintChecker.php
M includes/ConstraintReportFactory.php
M tests/phpunit/Checker/CommonsLinkChecker/CommonsLinkCheckerTest.php
M tests/phpunit/Checker/ConnectionChecker/ConflictsWithCheckerTest.php
M tests/phpunit/Checker/ConnectionChecker/InverseCheckerTest.php
M tests/phpunit/Checker/ConnectionChecker/ItemCheckerTest.php
M tests/phpunit/Checker/ConnectionChecker/SymmetricCheckerTest.php
M tests/phpunit/Checker/ConnectionChecker/TargetRequiredClaimCheckerTest.php
M tests/phpunit/Checker/FormatChecker/FormatCheckerTest.php
M tests/phpunit/Checker/OneOfChecker/OneOfCheckerTest.php
M tests/phpunit/Checker/QualifierChecker/MandatoryQualifiersCheckerTest.php
M tests/phpunit/Checker/QualifierChecker/QualifierCheckerTest.php
M tests/phpunit/Checker/QualifierChecker/QualifiersCheckerTest.php
M tests/phpunit/Checker/RangeChecker/DiffWithinRangeCheckerTest.php
M tests/phpunit/Checker/RangeChecker/RangeCheckerTest.php
M tests/phpunit/Checker/ReferenceCheckerTest.php
M tests/phpunit/Checker/TypeChecker/TypeCheckerTest.php
M tests/phpunit/Checker/TypeChecker/ValueTypeCheckerTest.php
M tests/phpunit/Checker/ValueCountChecker/MultiValueCheckerTest.php
M tests/phpunit/Checker/ValueCountChecker/SingleValueCheckerTest.php
M tests/phpunit/Checker/ValueCountChecker/UniqueValueCheckerTest.php
M tests/phpunit/Checker/ValueOnlyCheckerTest.php
D tests/phpunit/Context/StatementContextTest.php
M tests/phpunit/Helper/ConstraintParameterParserTest.php
M tests/phpunit/Helper/LoggingHelperTest.php
28 files changed, 117 insertions(+), 357 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityConstraints
 refs/changes/88/385388/1

diff --git a/extension.json b/extension.json
index 7dbb153..eb3ba73 100644
--- a/extension.json
+++ b/extension.json
@@ -124,19 +124,14 @@
"description": "Whether to import property constraint 
statements into the constraint database or not.",
"public": true
},
-   "WBQualityConstraintsNewApiOutputFormat": {
-   "value": true,
-   "description": "Whether to use the new API output 
format, based on the Wikibase entity JSON format, which can accommodate 
constraint results on qualifiers and references.",
-   "public": true
-   },
"WBQualityConstraintsCheckQualifiers": {
"value": false,
-   "description": "Whether to check constraints on 
qualifiers. Requires the new API output format (otherwise ignored).",
+   "description": "Whether to check constraints on 
qualifiers.",
"public": true
},
"WBQualityConstraintsCheckReferences": {
"value": false,
-   "description": "Whether to check constraints on 
references. Requires the new API output format (otherwise ignored).",
+   "description": "Whether to check constraints on 
references.",
"public": true
},
"WBQualityConstraintsSparqlEndpoint": {
diff --git a/includes/ConstraintCheck/Context/ApiV2Context.php 
b/includes/ConstraintCheck/Context/ApiV2Context.php
index 5ac66e9..b693b10 100644
--- a/includes/ConstraintCheck/Context/ApiV2Context.php
+++ b/includes/ConstraintCheck/Context/ApiV2Context.php
@@ -4,6 +4,7 @@
 
 /**
  * Abstract superclass of all contexts for the second version of the API 
output format.
+ * (This is currently the only supported format.)
  *
  * This output format is modeled after the Wikibase entity JSON format,
  * where an object with the members 'hash' and a list of 'reports' can appear
diff --git a/includes/ConstraintCheck/Context/StatementContext.php 
b/includes/ConstraintCheck/Context/StatementContext.php
deleted file mode 100644
index 2968a0d..000
--- a/includes/ConstraintCheck/Context/StatementContext.php
+++ /dev/null
@@ -1,76 +0,0 @@
-getMainSnak() );
-   $this->statement = $statement;
-   }
-
-   public function getType() {
-   return self::TYPE_STATEMENT;
-   }
-
-   public function getSnakRank() {
-   return $this->statement->getRank();
-   }
-
-   public function getSnakStatement() {
-   return $this->statement;
-   }
-
-   /**
-* The $container is keyed by entity ID, then by property ID,
-* t