[Wikidata-bugs] [Maniphest] [Commented On] T198077: [Wikidata.org] AutoLoaderStructureTest::testPSR4Completeness fails

2018-06-26 Thread gerritbot
gerritbot added a comment.
Change 441859 merged by jenkins-bot:
[mediawiki/extensions/Wikidata.org@master] Move PHP source file to src/ directory

https://gerrit.wikimedia.org/r/441859TASK DETAILhttps://phabricator.wikimedia.org/T198077EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Lucas_Werkmeister_WMDE, gerritbotCc: gerritbot, Legoktm, Aklapper, hashar, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Jayprakash12345, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, thcipriani, Wikidata-bugs, aude, Mbch331, Jay8g, Krenair, greg___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T198077: [Wikidata.org] AutoLoaderStructureTest::testPSR4Completeness fails

2018-06-26 Thread gerritbot
gerritbot added a comment.
Change 441859 had a related patch set uploaded (by Hashar; owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikidata.org@master] Move PHP source file to src/ directory

https://gerrit.wikimedia.org/r/441859TASK DETAILhttps://phabricator.wikimedia.org/T198077EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, Legoktm, Aklapper, hashar, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Jayprakash12345, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, thcipriani, Wikidata-bugs, aude, Mbch331, Jay8g, Krenair, greg___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T198077: [Wikidata.org] AutoLoaderStructureTest::testPSR4Completeness fails

2018-06-25 Thread gerritbot
gerritbot added a comment.
Change 441853 merged by jenkins-bot:
[mediawiki/extensions/Wikidata.org@master] Do not use ./ in AutoloadNamespaces

https://gerrit.wikimedia.org/r/441853TASK DETAILhttps://phabricator.wikimedia.org/T198077EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, Legoktm, Aklapper, hashar, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Jayprakash12345, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, thcipriani, Wikidata-bugs, aude, Mbch331, Jay8g, Krenair, greg___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T198077: [Wikidata.org] AutoLoaderStructureTest::testPSR4Completeness fails

2018-06-25 Thread gerritbot
gerritbot added a comment.
Change 441852 merged by jenkins-bot:
[mediawiki/core@master] Revert "Use pathinfo() in AutoLoaderStructureTest::testPSR4Completeness"

https://gerrit.wikimedia.org/r/441852TASK DETAILhttps://phabricator.wikimedia.org/T198077EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, Legoktm, Aklapper, hashar, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Jayprakash12345, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, thcipriani, Wikidata-bugs, aude, Mbch331, Jay8g, Krenair, greg___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T198077: [Wikidata.org] AutoLoaderStructureTest::testPSR4Completeness fails

2018-06-25 Thread hashar
hashar added a comment.
I went with a workaround in the extension : https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikidata.org/+/441853TASK DETAILhttps://phabricator.wikimedia.org/T198077EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: hasharCc: gerritbot, Legoktm, Aklapper, hashar, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Jayprakash12345, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, thcipriani, Wikidata-bugs, aude, Mbch331, Jay8g, Krenair, greg___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T198077: [Wikidata.org] AutoLoaderStructureTest::testPSR4Completeness fails

2018-06-25 Thread gerritbot
gerritbot added a comment.
Change 441853 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/extensions/Wikidata.org@master] Do not use ./ in AutoloadNamespaces

https://gerrit.wikimedia.org/r/441853TASK DETAILhttps://phabricator.wikimedia.org/T198077EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, Legoktm, Aklapper, hashar, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Jayprakash12345, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, thcipriani, Wikidata-bugs, aude, Mbch331, Jay8g, Krenair, greg___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T198077: [Wikidata.org] AutoLoaderStructureTest::testPSR4Completeness fails

2018-06-25 Thread gerritbot
gerritbot added a comment.
Change 441852 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/core@master] Revert "Use pathinfo() in AutoLoaderStructureTest::testPSR4Completeness"

https://gerrit.wikimedia.org/r/441852TASK DETAILhttps://phabricator.wikimedia.org/T198077EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, Legoktm, Aklapper, hashar, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Jayprakash12345, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, thcipriani, Wikidata-bugs, aude, Mbch331, Jay8g, Krenair, greg___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T198077: [Wikidata.org] AutoLoaderStructureTest::testPSR4Completeness fails

2018-06-25 Thread gerritbot
gerritbot added a comment.
Change 441832 merged by jenkins-bot:
[mediawiki/core@master] Use pathinfo() in AutoLoaderStructureTest::testPSR4Completeness

https://gerrit.wikimedia.org/r/441832TASK DETAILhttps://phabricator.wikimedia.org/T198077EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, Legoktm, Aklapper, hashar, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Jayprakash12345, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, thcipriani, Wikidata-bugs, aude, Mbch331, Jay8g, Krenair, greg___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T198077: [Wikidata.org] AutoLoaderStructureTest::testPSR4Completeness fails

2018-06-25 Thread gerritbot
gerritbot added a comment.
Change 441832 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/core@master] Use pathinfo() in testPSR4Completeness

https://gerrit.wikimedia.org/r/441832TASK DETAILhttps://phabricator.wikimedia.org/T198077EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, Legoktm, Aklapper, hashar, Lahi, Gq86, GoranSMilovanovic, Jayprakash12345, QZanden, LawExplorer, thcipriani, Wikidata-bugs, aude, Mbch331, Jay8g, Krenair, greg___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T198077: [Wikidata.org] AutoLoaderStructureTest::testPSR4Completeness fails

2018-06-25 Thread hashar
hashar added a comment.
Extension registry does not normalizes the path at:

protected function processAutoLoader( $dir, array $files ) { 
// Make paths absolute, relative to the JSON file
foreach ( $files as &$file ) { 
$file = "$dir/$file";
}

So one end up with: /home/hashar/projects/mediawiki/extensions/Wikidata.org/./Hooks.php

The test then:

$abbrFileName = substr( substr( $file, strlen( $dir ) ), 0, -4 );

Which gives: oks because $dir is too long (it has an extra ./).

Using an empty string as a value for AutoloadNamespaces  works fine. The autoloader works in either case.

In the test we can assume the file exists (since it does a file_get_contents), so probably the test should use real_path() to obtain the canonical and absolute path then use path_info() to retrieve the filename:

php > var_dump( pathinfo( 'wikidata.org/./Hooks.php' ) );
array(4) {
  ["dirname"]=>
  string(14) "wikidata.org/."
  ["basename"]=>
  string(9) "Hooks.php"
  ["extension"]=>
  string(3) "php"
  ["filename"]=>
  string(5) "Hooks"
}

php > var_dump( pathinfo( '/home/hashar/projects/mediawiki/extensions/Wikidata.org/Hooks.php', PATHINFO_FILENAME ) );
string(5) "Hooks"

Ie:

- $abbrFileName = substr( substr( $file, strlen( $dir ) ), 0, -4 );
+ $abbrFileName = pathinfo( $file );

TASK DETAILhttps://phabricator.wikimedia.org/T198077EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: hasharCc: Legoktm, Aklapper, hashar, Lahi, Gq86, GoranSMilovanovic, Jayprakash12345, QZanden, LawExplorer, thcipriani, Wikidata-bugs, aude, Mbch331, Jay8g, Krenair, greg___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T198077: [Wikidata.org] AutoLoaderStructureTest::testPSR4Completeness fails

2018-06-25 Thread Legoktm
Legoktm added a comment.
This *might* be an issue with the test itself, I'm not sure how it handles a path of ./...but really the Hooks file should be in includes/ or src/.TASK DETAILhttps://phabricator.wikimedia.org/T198077EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: LegoktmCc: Legoktm, Aklapper, hashar, Lahi, Gq86, GoranSMilovanovic, Jayprakash12345, QZanden, LawExplorer, thcipriani, Wikidata-bugs, aude, Mbch331, Jay8g, Krenair, greg___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs