jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/378200 )
Change subject: Update documentation for extension.json manifest_version 2
......................................................................
Update documentation for extension.json manifest_version 2
Attributes are now stored under the key "attributes", and then
namespaced under the extension name.
Change-Id: I6cfc73e47e89e5e94ed412a3e5e9850b65559e63
---
M includes/EventLoggingHooks.php
M includes/JsonSchemaContent.php
2 files changed, 11 insertions(+), 4 deletions(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
Jforrester: Looks good to me, but someone else must approve
diff --git a/includes/EventLoggingHooks.php b/includes/EventLoggingHooks.php
index c6a8265..fa2afa3 100644
--- a/includes/EventLoggingHooks.php
+++ b/includes/EventLoggingHooks.php
@@ -58,11 +58,15 @@
* $schemas[ 'MultimediaViewerNetworkPerformance' ] = 7917896;
* };
* @endcode
- * @par Example using extension.json
+ * @par Example using extension.json (manifest_version 2)
* @code
* {
- * "EventLoggingSchemas": {
- * "MultimediaViewerNetworkPerformance": 7917896
+ * "attributes": {
+ * "EventLogging": {
+ * "Schemas": {
+ * "MultimediaViewerNetworkPerformance": 7917896
+ * }
+ * }
* }
* }
* @endcode
diff --git a/includes/JsonSchemaContent.php b/includes/JsonSchemaContent.php
index 6e82c51..3d835d1 100644
--- a/includes/JsonSchemaContent.php
+++ b/includes/JsonSchemaContent.php
@@ -124,7 +124,10 @@
], [
'language' => 'json',
'header' =>
'eventlogging-code-sample-module-setup-json',
- 'code' => "{\n\t\"EventLoggingSchemas\":
{\n\t\t\"$dbKey\": $revId\n\t}\n}",
+ 'code' => FormatJson::encode( [
+ 'attributes' => [ 'EventLogging' => [
+ 'Schemas' => [ $dbKey =>
$revId, ] ]
+ ] ], "\t" ),
], [
'language' => 'javascript',
'header' =>
'eventlogging-code-sample-logging-on-client-side',
--
To view, visit https://gerrit.wikimedia.org/r/378200
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6cfc73e47e89e5e94ed412a3e5e9850b65559e63
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Niharika29 <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits