Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/306873

Change subject: registration: Support 'ServiceWiringFiles' in extension.json
......................................................................

registration: Support 'ServiceWiringFiles' in extension.json

Change-Id: Ib413a14cb8e21207264fa1c45d84550b3eab7a4e
---
M docs/extension.schema.json
M docs/extension.schema.v1.json
M includes/registration/ExtensionProcessor.php
3 files changed, 19 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/73/306873/1

diff --git a/docs/extension.schema.json b/docs/extension.schema.json
index c010014..384bfb4 100644
--- a/docs/extension.schema.json
+++ b/docs/extension.schema.json
@@ -908,6 +908,10 @@
                        "type": "array",
                        "description": "Parser test suite files to be run by 
parserTests.php when no specific filename is passed to it"
                },
+               "ServiceWiringFiles": {
+                       "type": "array",
+                       "description": "List of service wiring files to be 
loaded by the default instance of MediaWikiServices"
+               },
                "load_composer_autoloader": {
                        "type": "boolean",
                        "description": "Load the composer autoloader for this 
extension, if one is present"
diff --git a/docs/extension.schema.v1.json b/docs/extension.schema.v1.json
index d707864..c4a1a8d 100644
--- a/docs/extension.schema.v1.json
+++ b/docs/extension.schema.v1.json
@@ -887,6 +887,10 @@
                        "type": "array",
                        "description": "Parser test suite files to be run by 
parserTests.php when no specific filename is passed to it"
                },
+               "ServiceWiringFiles": {
+                       "type": "array",
+                       "description": "List of service wiring files to be 
loaded by the default instance of MediaWikiServices"
+               },
                "load_composer_autoloader": {
                        "type": "boolean",
                        "description": "Load the composer autoloader for this 
extension, if one is present"
diff --git a/includes/registration/ExtensionProcessor.php 
b/includes/registration/ExtensionProcessor.php
index 5555e8b..fa3e273 100644
--- a/includes/registration/ExtensionProcessor.php
+++ b/includes/registration/ExtensionProcessor.php
@@ -110,6 +110,7 @@
                'type',
                'config',
                'config_prefix',
+               'ServiceWiringFiles',
                'ParserTestFiles',
                'AutoloadClasses',
                'manifest_version',
@@ -174,6 +175,7 @@
                $this->extractMessagesDirs( $dir, $info );
                $this->extractNamespaces( $info );
                $this->extractResourceLoaderModules( $dir, $info );
+               $this->extractServiceWiringFiles( $dir, $info );
                $this->extractParserTestFiles( $dir, $info );
                if ( isset( $info['callback'] ) ) {
                        $this->callbacks[] = $info['callback'];
@@ -406,6 +408,15 @@
                }
        }
 
+       protected function extractServiceWiringFiles( $dir, array $info ) {
+               if ( isset( $info['ServiceWiringFiles'] ) ) {
+                       foreach ( $info['ServiceWiringFiles'] as $path ) {
+                               $this->globals['wgServiceWiringFiles'][] = 
"$dir/$path";
+                       }
+               }
+       }
+
+
        protected function extractParserTestFiles( $dir, array $info ) {
                if ( isset( $info['ParserTestFiles'] ) ) {
                        foreach ( $info['ParserTestFiles'] as $path ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/306873
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib413a14cb8e21207264fa1c45d84550b3eab7a4e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to