jenkins-bot has submitted this change and it was merged.

Change subject: Use load_composer_autoloader
......................................................................


Use load_composer_autoloader

See Ib031bef17c8a7d708a5c7878e74967d19217bbc8

Change-Id: I7c2a30058244dc89c71fee9356278b72740b67e6
---
M ContentTranslation.hooks.php
M extension.json
2 files changed, 1 insertion(+), 13 deletions(-)

Approvals:
  Nikerabbit: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index 9711584..231c71e 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -10,16 +10,6 @@
 
 class ContentTranslationHooks {
        /**
-        * Extra setup in addition to extension.json.
-        */
-       public static function onSetup() {
-               // Composer support
-               if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
-                       require_once __DIR__ . '/vendor/autoload.php';
-               }
-       }
-
-       /**
         * Utility function that checks whether CX is enabled for a given user.
         * Currently it checks that if CX is a beta feature, whether the user 
has
         * enabled it. Otherwise it is always enabled.
diff --git a/extension.json b/extension.json
index 7825485..0d4bebd 100644
--- a/extension.json
+++ b/extension.json
@@ -16,9 +16,6 @@
        "descriptionmsg": "cx-desc",
        "license-name": "GPL-2.0+",
        "type": "specialpage",
-       "ExtensionFunctions": [
-               "ContentTranslationHooks::onSetup"
-       ],
        "ExtensionMessagesFiles": {
                "ContentTranslationAliases": "ContentTranslation.alias.php"
        },
@@ -1081,5 +1078,6 @@
                "localBasePath": "modules",
                "remoteExtPath": "ContentTranslation/modules"
        },
+       "load_composer_autoloader": true,
        "manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c2a30058244dc89c71fee9356278b72740b67e6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to