From 12bc46e0d42db4a16f17db7751fc790c67e8bb80 Mon Sep 17 00:00:00 2001 From: thomas-topway-it Date: Tue, 13 Sep 2022 12:51:05 +0400 Subject: [PATCH 1/3] AutoloadNamespaces and AutoloadClasses --- extension.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extension.json b/extension.json index 8bc763b..a3a31c9 100644 --- a/extension.json +++ b/extension.json @@ -15,6 +15,12 @@ "SemanticMediaWiki": ">= 3.0" } }, + "AutoloadNamespaces": { + "SCI\\": "src" + }, + "AutoloadClasses": { + "SemanticCite": "SemanticCite.php" + }, "MessagesDirs": { "SemanticCite": [ "i18n" From fd1bf2764f3662222684052051d1dca32ef0f699 Mon Sep 17 00:00:00 2001 From: thomas-topway-it Date: Tue, 13 Sep 2022 12:52:42 +0400 Subject: [PATCH 2/3] removed MW_PHPUNIT_TEST from register method --- src/HookRegistry.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/HookRegistry.php b/src/HookRegistry.php index f045af7..01941a7 100644 --- a/src/HookRegistry.php +++ b/src/HookRegistry.php @@ -108,9 +108,9 @@ public function getHandlerFor( $name ) { */ public function register() { - if ( !defined( 'MW_PHPUNIT_TEST' ) ) { - return; - } + //if ( !defined( 'MW_PHPUNIT_TEST' ) ) { + // return; + //} foreach ( $this->handlers as $name => $callback ) { if ( From ddabad0727cba8a3008a9e92496d62bbe4eab78b Mon Sep 17 00:00:00 2001 From: thomas-topway-it Date: Tue, 13 Sep 2022 13:54:19 +0400 Subject: [PATCH 3/3] note to MW_PHPUNIT_TEST --- src/HookRegistry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HookRegistry.php b/src/HookRegistry.php index 01941a7..72d5ff1 100644 --- a/src/HookRegistry.php +++ b/src/HookRegistry.php @@ -107,7 +107,7 @@ public function getHandlerFor( $name ) { * @since 1.0 */ public function register() { - + // *** not clear why this has been added //if ( !defined( 'MW_PHPUNIT_TEST' ) ) { // return; //}