Merge "registration: Deprecate ParserTestFiles in extension.json"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 9 Jun 2019 20:13:23 +0000 (20:13 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 9 Jun 2019 20:13:23 +0000 (20:13 +0000)
docs/extension.schema.v1.json
docs/extension.schema.v2.json
includes/registration/ExtensionJsonValidator.php

index cf02f2b..86fa1b3 100644 (file)
                },
                "ParserTestFiles": {
                        "type": "array",
-                       "description": "Parser test suite files to be run by parserTests.php when no specific filename is passed to it"
+                       "description": "DEPRECATED: Parser test suite files to be run by parserTests.php when no specific filename is passed to it"
                },
                "ServiceWiringFiles": {
                        "type": "array",
index f29f850..6076581 100644 (file)
                },
                "ParserTestFiles": {
                        "type": "array",
-                       "description": "Parser test suite files to be run by parserTests.php when no specific filename is passed to it"
+                       "description": "DEPRECATED: Parser test suite files to be run by parserTests.php when no specific filename is passed to it"
                },
                "ServiceWiringFiles": {
                        "type": "array",
index ba5df52..0d95b22 100644 (file)
@@ -141,6 +141,12 @@ class ExtensionJsonValidator {
                        }
                }
 
+               // Deprecated stuff
+               if ( isset( $data->ParserTestFiles ) ) {
+                       // phpcs:ignore Generic.Files.LineLength.TooLong
+                       $extraErrors[] = '[ParserTestFiles] DEPRECATED: see <https://www.mediawiki.org/wiki/Manual:Extension.json/Schema#ParserTestFiles>';
+               }
+
                $validator = new Validator;
                $validator->check( $data, (object)[ '$ref' => 'file://' . $schemaPath ] );
                if ( $validator->isValid() && !$extraErrors ) {