jenkins-bot has submitted this change and it was merged. 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, 18 insertions(+), 0 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved Florianschmidtwelzow: Looks good to me, but someone else must approve jenkins-bot: Verified 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..745c233 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,14 @@ } } + 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: merged Gerrit-Change-Id: Ib413a14cb8e21207264fa1c45d84550b3eab7a4e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com> Gerrit-Reviewer: Reedy <re...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits