Hashar has uploaded a new change for review.

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

Change subject: Add composer test and comment out missing autoload class
......................................................................

Add composer test and comment out missing autoload class

Intermediary patch that adds PHP parallel-lint and make the MediaWiki
core test suite 'extensions' to pass.

Add parallel-lint to composer.json and invoke it via the composer 'test'
script.
Remove composer autoload for Genealogy.php, whenever MEDIAWIKI is not
defined, it die(1) which prevent parallel-lint from passing.
Comment out GenealogySpecial class from $wgAutoloadClasses, it is not in
the actual code base and cause MediaWiki test to fail.
Update .gitignore for composer and npm vendor directories.

Signed-off-by: Antoine Musso <[email protected]>
Change-Id: I53542574a013a9787892c5ccc8ff6cfb3c00a82e
---
A .gitignore
M Genealogy.php
M composer.json
3 files changed, 10 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Genealogy 
refs/changes/50/322250/1

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..47e36d5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/node_modules/
+/vendor/
+/composer.lock
diff --git a/Genealogy.php b/Genealogy.php
index ea3ce10..0e654ba 100644
--- a/Genealogy.php
+++ b/Genealogy.php
@@ -37,7 +37,7 @@
  * Class loading
  */
 $wgAutoloadClasses['GenealogyPerson']    = __DIR__ . '/Person.php';
-$wgAutoloadClasses['GenealogySpecial']   = __DIR__ . '/Special.php';
+#$wgAutoloadClasses['GenealogySpecial']   = __DIR__ . '/Special.php';
 $wgAutoloadClasses['GenealogyCore']      = __DIR__ . '/Core.php';
 $wgAutoloadClasses['GenealogyTree']      = __DIR__ . '/Tree.php';
 $wgAutoloadClasses['GenealogyTraverser'] = __DIR__ . '/Traverser.php';
diff --git a/composer.json b/composer.json
index 8eab5b5..05d6462 100644
--- a/composer.json
+++ b/composer.json
@@ -18,9 +18,12 @@
        },
        "require": {
        },
-       "autoload": {
-               "files" : [
-                       "Genealogy.php"
+       "require-dev": {
+               "jakub-onderka/php-parallel-lint": "0.9.2"
+       },
+       "scripts": {
+               "test": [
+                       "parallel-lint . --exclude node_modules --exclude 
vendor"
                ]
        }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53542574a013a9787892c5ccc8ff6cfb3c00a82e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Genealogy
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Samwilson <[email protected]>

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

Reply via email to