[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2023-08-19 Thread Daimona
Daimona added a subtask: T142120: Remove UnitTestsList hook subscribers, move 
tests to be autodiscovered for extensions that have been converted to extension 
registration.

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Daimona
Cc: Daimona, Krinkle, cscott, kostajh, Jdforrester-WMF, Aklapper, 
Danny_Benjafield_WMDE, fbalicchia, Astuthiodit_1, SLopes-WMF, karapayneWMDE, 
Invadibot, maantietaja, ItamarWMDE, DAlangi_WMF, Akuckartz, darthmon_wmde, 
WDoranWMF, EvanProdromou, Nandana, lucamauri, Lahi, Gq86, GoranSMilovanovic, 
QZanden, LawExplorer, _jensen, rosalieper, Agabi10, Scott_WUaS, Pchelolo, 
XenoRyet, Izno, Jrf, Wikidata-bugs, aude, Dinoguy1000, ssastry, Arlolra, 
Mbch331, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2023-07-13 Thread Daimona
Daimona added a comment.


  Note that the presence of this hook makes it quite difficult to have a 
standard PHPUnit setup (T227900 , 
T90875 ), because we need to fully 
initialize MediaWiki in order to run the hook. For now I'm going to implement a 
workaround, but I'd really like to see this hook go away.

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Daimona
Cc: Daimona, Krinkle, cscott, kostajh, Jdforrester-WMF, Aklapper, fbalicchia, 
Astuthiodit_1, SLopes-WMF, karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, 
DAlangi_WMF, Akuckartz, darthmon_wmde, WDoranWMF, EvanProdromou, Nandana, 
lucamauri, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, 
rosalieper, Agabi10, Scott_WUaS, Pchelolo, XenoRyet, Izno, Jrf, Wikidata-bugs, 
aude, Dinoguy1000, ssastry, Arlolra, Mbch331, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2023-07-13 Thread Daimona
Daimona removed parent tasks: T227900: Phase out usage of 
tests/phpunit/suite.xml, T90875: Use vendor/bin/phpunit instead of 
tests/phpunit/phpunit.php.

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Daimona
Cc: Krinkle, cscott, kostajh, Jdforrester-WMF, Aklapper, fbalicchia, 
Astuthiodit_1, SLopes-WMF, karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, 
DAlangi_WMF, Akuckartz, darthmon_wmde, WDoranWMF, EvanProdromou, Nandana, 
lucamauri, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, 
rosalieper, Agabi10, Scott_WUaS, Pchelolo, XenoRyet, Izno, Jrf, Wikidata-bugs, 
aude, Dinoguy1000, ssastry, Arlolra, Mbch331, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2023-07-13 Thread Daimona
Daimona added a parent task: T227900: Phase out usage of 
tests/phpunit/suite.xml.

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Daimona
Cc: Krinkle, cscott, kostajh, Jdforrester-WMF, Aklapper, fbalicchia, 
Astuthiodit_1, SLopes-WMF, karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, 
DAlangi_WMF, Akuckartz, darthmon_wmde, WDoranWMF, EvanProdromou, Nandana, 
lucamauri, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, 
rosalieper, Agabi10, Scott_WUaS, Pchelolo, XenoRyet, Izno, Jrf, Wikidata-bugs, 
aude, Dinoguy1000, ssastry, Arlolra, Mbch331, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2023-03-16 Thread Maintenance_bot
Maintenance_bot removed a project: Patch-For-Review.

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Maintenance_bot
Cc: Krinkle, cscott, kostajh, Jdforrester-WMF, Aklapper, Astuthiodit_1, 
SLopes-WMF, karapayneWMDE, Invadibot, Universal_Omega, maantietaja, ItamarWMDE, 
DAlangi_WMF, Akuckartz, darthmon_wmde, WDoranWMF, EvanProdromou, Nandana, 
lucamauri, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, 
rosalieper, Agabi10, Scott_WUaS, Pchelolo, XenoRyet, Izno, Jrf, Wikidata-bugs, 
aude, Dinoguy1000, ssastry, Arlolra, Mbch331, Jay8g, Themindcoder, Adamm71, 
Jersione, Hellket777, LisafBia6531, 786, Biggs657, Juan90264, Alter-paule, 
Beast1978, Un1tY, Hook696, Kent7301, joker88john, CucyNoiD, Gaboe420, 
Giuliamocci, Cpaulf30, Af420, Bsandipan, Lewizho99, Maathavan, Neuronton
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2023-03-16 Thread gerritbot
gerritbot added a comment.


  Change 761894 **abandoned** by Kosta Harlan:
  
  [mediawiki/extensions/DonationInterface@master] [WIP] Remove UnitTestsList 
hook
  
  Reason:
  
  
  
  https://gerrit.wikimedia.org/r/761894

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: gerritbot
Cc: Krinkle, cscott, kostajh, Jdforrester-WMF, Aklapper, Themindcoder, Adamm71, 
Jersione, Hellket777, LisafBia6531, Astuthiodit_1, SLopes-WMF, 786, Biggs657, 
karapayneWMDE, Invadibot, Universal_Omega, maantietaja, Juan90264, Alter-paule, 
Beast1978, ItamarWMDE, Un1tY, DAlangi_WMF, Akuckartz, Hook696, darthmon_wmde, 
WDoranWMF, Kent7301, EvanProdromou, joker88john, CucyNoiD, Nandana, Gaboe420, 
lucamauri, Giuliamocci, Cpaulf30, Lahi, Gq86, Af420, Bsandipan, 
GoranSMilovanovic, QZanden, LawExplorer, Lewizho99, Maathavan, _jensen, 
rosalieper, Agabi10, Neuronton, Scott_WUaS, Pchelolo, XenoRyet, Izno, Jrf, 
Wikidata-bugs, aude, Dinoguy1000, ssastry, Arlolra, Mbch331, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2022-02-11 Thread gerritbot
gerritbot added a project: Patch-For-Review.

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: gerritbot
Cc: Krinkle, cscott, kostajh, Jdforrester-WMF, Aklapper, Fernandobacasegua34, 
786, Suran38, Biggs657, Invadibot, Lalamarie69, maantietaja, Juan90264, 
Alter-paule, Beast1978, Un1tY, Akuckartz, Hook696, darthmon_wmde, WDoranWMF, 
Kent7301, EvanProdromou, joker88john, DannyS712, CucyNoiD, Nandana, Gaboe420, 
lucamauri, Giuliamocci, Cpaulf30, Lahi, Gq86, Af420, Bsandipan, 
GoranSMilovanovic, QZanden, LawExplorer, Lewizho99, Maathavan, _jensen, 
rosalieper, Agabi10, Neuronton, Scott_WUaS, Pchelolo, XenoRyet, Izno, Jrf, 
Wikidata-bugs, aude, Dinoguy1000, ssastry, Arlolra, Addshore, Mbch331, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2022-02-11 Thread gerritbot
gerritbot added a comment.


  Change 761894 had a related patch set uploaded (by Kosta Harlan; author: 
Kosta Harlan):
  
  [mediawiki/extensions/DonationInterface@master] [WIP] Remove UnitTestsList 
hook
  
  https://gerrit.wikimedia.org/r/761894

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: gerritbot
Cc: Krinkle, cscott, kostajh, Jdforrester-WMF, Aklapper, Invadibot, 
maantietaja, Akuckartz, darthmon_wmde, WDoranWMF, EvanProdromou, DannyS712, 
Nandana, lucamauri, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, 
_jensen, rosalieper, Agabi10, Scott_WUaS, Pchelolo, XenoRyet, Izno, Jrf, 
Wikidata-bugs, aude, Dinoguy1000, ssastry, Arlolra, Addshore, Mbch331, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2022-02-11 Thread kostajh
kostajh added a comment.


  In T298509#7640564 , 
@cscott wrote:
  
  > In T298509#7633961 , 
@kostajh wrote:
  >
  >> `composer phpunit:unit` will run unit (not integration) tests for core and 
all skins/extensions, regardless of whether they're enabled, but those tests 
don't rely on LocalSettings.php so I don't think that's what you're referring 
to?
  >
  > They may not rely on LocalSettings.php but they do depend on `composer 
update`, references to deprecated methods, etc, so they will certainly fail 
even if `LocalSettings.php` isn't involved.
  >
  > For example, `composer phpunit:unit` at the moment in my tree consisting of 
only WMF production extensions (but most of them disabled or unconfigured or 
old checkouts from the last time I had to patch them) fails with 582 errors, 
ending with:
  >
  >   582) 
Flow\Tests\Data\ManagerGroupTest::testCachePurgeCallsAppropriateManager
  >   Error: Class 'Pimple\Container' not found
  >   
  >   /home/cananian/Projects/Wikimedia/Flow/includes/Container.php:5
  >
  > Yes, in theory I could write a script to `git pull` and `composer update` 
in each and every checked out extension (282 of them at the moment, and those 
are just extensions I've personally patched at one point or another), but the 
point is: phpunit shouldn't be looking at extensions I haven't actually 
enabled, just because they happen to be present on disk.
  
  As an aside, you can use 
https://www.mediawiki.org/wiki/Composer#Using_composer-merge-plugin so that you 
just run `composer update` in the root of the repo, and the merge plugin will 
handle updates for any extensions/skins.
  
  `composer phpunit:unit` by default runs unit tests across 
core/extensions/skins for convenience, but you could also just run 
`vendor/bin/phpunit {pathToExtensionTests} {pathToAnotherExtensionTests}` etc, 
and make an alias or something for convenience. We don't currently have a 
static listing of enabled extensions/skins, which would be nice IMO, but I 
don't think it is a good idea to require bootstrapping MediaWiki in order to 
tell it where tests are. That slows down the overall testing setup and also 
causes problems for e.g. data providers which don't have any access to the MW 
anyway in a vanilla PHPUnit setup.
  
  In T298509#7640575 , 
@cscott wrote:
  
  > In any case, apart from my general griping, this is the actual issue:
  >
  > In T298509#7609799 , 
@cscott wrote:
  >
  >> I don't know how DonationInterface and Wikibase are using this hook, but 
Parsoid's use is pretty subtle and not obviously easily replaced: Parsoid is 
*both* a library *and* and extension, and we need to be able to squirrel away 
Parsoid's "standalone" tests (run by `composer test` without access to a 
MediaWiki instance) somewhere where core's default auto discovery of tests 
won't find it -- and similarly, we need to be able to write "extension" tests 
(which require access to a MediaWiki instance) in a way that the standard 
`composer test` won't find them.
  >>
  >> This is pretty easy to do if extension discovery is done with executable 
code (or at least a hook to executable code).  It seems quite challenging if 
you're using static `phpunit.xml.dist` files.
  >
  > If you allowed extensions to declaratively customize the 'tests/phpunit' 
subpath, that would probably be sufficient.  Parsoid's extension.json could 
specify that MediaWiki should run the tests in `extension/tests/phpunit` and 
that MediaWiki should ignore the tests in `tests/phpunit`.
  
  Maybe we could implement the workarounds in Quibble, since it sounds like 
this is a temporary situation for Parsoid anyway?

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: kostajh
Cc: Krinkle, cscott, kostajh, Jdforrester-WMF, Aklapper, Invadibot, 
maantietaja, Akuckartz, darthmon_wmde, WDoranWMF, EvanProdromou, DannyS712, 
Nandana, lucamauri, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, 
_jensen, rosalieper, Agabi10, Scott_WUaS, Pchelolo, XenoRyet, Izno, Jrf, 
Wikidata-bugs, aude, Dinoguy1000, ssastry, Arlolra, Addshore, Mbch331, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2022-01-21 Thread cscott
cscott added a comment.


  In any case, apart from my general griping, this is the actual issue:
  
  In T298509#7609799 , 
@cscott wrote:
  
  > I don't know how DonationInterface and Wikibase are using this hook, but 
Parsoid's use is pretty subtle and not obviously easily replaced: Parsoid is 
*both* a library *and* and extension, and we need to be able to squirrel away 
Parsoid's "standalone" tests (run by `composer test` without access to a 
MediaWiki instance) somewhere where core's default auto discovery of tests 
won't find it -- and similarly, we need to be able to write "extension" tests 
(which require access to a MediaWiki instance) in a way that the standard 
`composer test` won't find them.
  >
  > This is pretty easy to do if extension discovery is done with executable 
code (or at least a hook to executable code).  It seems quite challenging if 
you're using static `phpunit.xml.dist` files.
  
  If you allowed extensions to declaratively customize the 'tests/phpunit' 
subpath, that would probably be sufficient.  Parsoid's extension.json could 
specify that MediaWiki should run the tests in `extension/tests/phpunit` and 
that MediaWiki should ignore the tests in `tests/phpunit`.

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: cscott
Cc: Krinkle, cscott, kostajh, Jdforrester-WMF, Aklapper, Invadibot, 
maantietaja, Akuckartz, darthmon_wmde, WDoranWMF, EvanProdromou, DannyS712, 
Nandana, lucamauri, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, 
_jensen, rosalieper, Agabi10, Scott_WUaS, Pchelolo, XenoRyet, Izno, Jrf, 
Wikidata-bugs, aude, Dinoguy1000, ssastry, Arlolra, Addshore, Mbch331, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2022-01-21 Thread cscott
cscott added a comment.


  In T298509#7633961 , 
@kostajh wrote:
  
  > `composer phpunit:unit` will run unit (not integration) tests for core and 
all skins/extensions, regardless of whether they're enabled, but those tests 
don't rely on LocalSettings.php so I don't think that's what you're referring 
to?
  
  They may not rely on LocalSettings.php but they do depend on `composer 
update`, references to deprecated methods, etc, so they will certainly fail 
even if `LocalSettings.php` isn't involved.

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: cscott
Cc: Krinkle, cscott, kostajh, Jdforrester-WMF, Aklapper, Invadibot, 
maantietaja, Akuckartz, darthmon_wmde, WDoranWMF, EvanProdromou, DannyS712, 
Nandana, lucamauri, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, 
_jensen, rosalieper, Agabi10, Scott_WUaS, Pchelolo, XenoRyet, Izno, Jrf, 
Wikidata-bugs, aude, Dinoguy1000, ssastry, Arlolra, Addshore, Mbch331, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2022-01-19 Thread kostajh
kostajh added a comment.


  In T298509#7633606 , 
@Krinkle wrote:
  
  > In T298509#7609799 , 
@cscott wrote:
  >
  >> In my personal opinion, rMW1d7221d066c0 
 
was a mistake: as a MediaWiki developer I have just about every extension every 
authored checked out in an `extensions` directory, and I enable them on demand 
via LocalSettings.php.  But after `rMWcf4654399bd3` phpunit completely ignores 
my LocalSettings.php and runs tests on every extension it finds in the 
directory, regardless of whether it is currently enabled/configured/set up, etc.
  
  Can you please share what command(s) you are using to run the tests?
  
  `composer phpunit:unit` will run unit (not integration) tests for core and 
all skins/extensions, regardless of whether they're enabled, but those tests 
don't rely on LocalSettings.php so I don't think that's what you're referring 
to?

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: kostajh
Cc: Krinkle, cscott, kostajh, Jdforrester-WMF, Aklapper, Invadibot, 
maantietaja, Akuckartz, darthmon_wmde, WDoranWMF, EvanProdromou, DannyS712, 
Nandana, lucamauri, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, 
_jensen, rosalieper, Agabi10, Scott_WUaS, Pchelolo, XenoRyet, Izno, Jrf, 
Wikidata-bugs, aude, Dinoguy1000, ssastry, Arlolra, Addshore, Mbch331, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2022-01-19 Thread Krinkle
Krinkle added a comment.


  In T298509#7609799 , 
@cscott wrote:
  
  > In my personal opinion, rMW1d7221d066c0 
 
was a mistake: as a MediaWiki developer I have just about every extension every 
authored checked out in an `extensions` directory, and I enable them on demand 
via LocalSettings.php.  But after `rMWcf4654399bd3` phpunit completely ignores 
my LocalSettings.php and runs tests on every extension it finds in the 
directory, regardless of whether it is currently enabled/configured/set up, 
etc.  So I have to resort to storing my extensions out of the tree and a hack 
in my LocalSettings.php that creates symlinks in my `extensions/` directory to 
correspond to the current set of enabled extensions.  That's annoying. […]
  
  I'm unable to reproduce this nor see how it could happen. I don't doubt 
you're experiencing it, but I am fairly confident that this is not in any way 
desirable or intended functionality and either result of a bug or an 
accident/misunderstanding in configuration.
  
  The linked patch discovers `tests/phpunit` in enabled extensions. It does not 
discover extensions. It uses ExtensionRegistry, which iterates over enabled 
extensions at run-time in the same way as e.g. Special:Version does.
  
  The only code I'm aware of that discovers uninstalled extensions, is the CLI 
installer where Antoine recently added a way for CI to quickly install MW with 
all extensions enabled that are present on disk, such that the logic for 
deciding which extensions to install in CI for a given repo is tied to which 
extension repos are cloned, and then MW takes it all. That's opt-in though, and 
afaik not something we expose to PHPUnit.

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Krinkle
Cc: Krinkle, cscott, kostajh, Jdforrester-WMF, Aklapper, Invadibot, 
maantietaja, Akuckartz, darthmon_wmde, WDoranWMF, EvanProdromou, DannyS712, 
Nandana, lucamauri, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, 
_jensen, rosalieper, Agabi10, Scott_WUaS, Pchelolo, XenoRyet, Izno, Jrf, 
Wikidata-bugs, aude, Dinoguy1000, ssastry, Arlolra, Addshore, Mbch331, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2022-01-10 Thread cscott
cscott added a comment.


  I don't know how DonationInterface and Wikibase are using this hook, but 
Parsoid's use is pretty subtle and not obviously easily replaced: Parsoid is 
*both* a library *and* and extension, and we need to be able to squirrel away 
Parsoid's "standalone" tests (run by `composer test` without access to a 
MediaWiki instance) somewhere where core's default auto discovery of tests 
won't find it -- and similarly, we need to be able to write "extension" tests 
(which require access to a MediaWiki instance) in a way that the standard 
`composer test` won't find them.
  
  This is pretty easy to do if extension discovery is done with executable code 
(or at least a hook to executable code).  It seems quite challenging if you're 
using static `phpunit.xml.dist` files.
  
  In my personal opinion, rMW1d7221d066c0 
 
was a mistake: as a MediaWiki developer I have just about every extension every 
authored checked out in an `extensions` directory, and I enable them on demand 
via LocalSettings.php.  But after `rMWcf4654399bd3` phpunit completely ignores 
my LocalSettings.php and runs tests on every extension it finds in the 
directory, regardless of whether it is currently enabled/configured/set up, 
etc.  So I have to resort to storing my extensions out of the tree and a hack 
in my LocalSettings.php that creates symlinks in my `extensions/` directory to 
correspond to the current set of enabled extensions.  That's annoying.
  
  On the other hand, I suppose if extension configuration was done 
declaratively (outside of LocalSettings.php) I wouldn't be as opposed to test 
discovery using the same mechanism.  As long as enabling/disabling an extension 
can be done in a single place.  Blindly runnings tests on anything found in 
`extensions/*/tests` is a disaster, though.

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: cscott
Cc: cscott, kostajh, Jdforrester-WMF, Aklapper, Invadibot, maantietaja, 
Akuckartz, darthmon_wmde, WDoranWMF, EvanProdromou, DannyS712, Nandana, 
lucamauri, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, 
rosalieper, Agabi10, Scott_WUaS, Pchelolo, XenoRyet, Izno, Jrf, Wikidata-bugs, 
aude, Dinoguy1000, ssastry, Arlolra, Addshore, Mbch331, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2022-01-10 Thread kostajh
kostajh added a project: Platform Engineering.
kostajh added a comment.


  Tagging #platform_engineering 
 in case they have 
opinions on this.

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: kostajh
Cc: kostajh, Jdforrester-WMF, Aklapper, Invadibot, maantietaja, Akuckartz, 
darthmon_wmde, WDoranWMF, EvanProdromou, DannyS712, Nandana, lucamauri, Lahi, 
Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Agabi10, 
Scott_WUaS, Pchelolo, XenoRyet, Izno, Jrf, Wikidata-bugs, aude, Dinoguy1000, 
ssastry, Arlolra, Addshore, Mbch331, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2022-01-04 Thread Maintenance_bot
Maintenance_bot added a project: Wikidata.
Restricted Application added a project: wdwb-tech.

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Maintenance_bot
Cc: kostajh, Jdforrester-WMF, Aklapper, Invadibot, maantietaja, Akuckartz, 
darthmon_wmde, DannyS712, Nandana, lucamauri, Lahi, Gq86, GoranSMilovanovic, 
QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, XenoRyet, Izno, Jrf, 
Wikidata-bugs, aude, Dinoguy1000, ssastry, Arlolra, Addshore, Mbch331, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T298509: Deprecate UnitTestsListHook

2022-01-04 Thread kostajh
kostajh created this task.
kostajh added projects: MediaWiki-Core-Tests, Technical-Debt, User-kostajh, 
MediaWiki-extensions-DonationInterface, 
MediaWiki-extensions-WikibaseRepository, MediaWiki-extensions-WikibaseClient, 
Parsoid.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION
  The UnitTestsListHook was added in MediaWiki in rMWcf4654399bd3: Extensions 
may add tests by directory 
 
(1.24), so extensions had to use some boilerplate code to implement this hook 
so that tests could be registered with MediaWiki. Then a few years later, 
rMW1d7221d066c0: Autodiscover extension unittests 
 
was added, which uses ExtensionRegistry to automatically discovering the unit 
tests paths.
  
  So, it seems like UnitTestsListHook is no longer needed.
  
  The existing implementers of the hook (thanks to @Jdforrester-WMF for listing 
these) are:
  
  - Parsoid 
https://gerrit.wikimedia.org/g/mediawiki/services/parsoid/+/debcd18399a4f598f47a856d614c973e99cb1738/extension/src/UnitTestsListHandler.php
  - Wikibase 
https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/aa639057e36c48ff1c3dcc0694c870d1ee4cda3b/extension-client.json
 and 
https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/aa639057e36c48ff1c3dcc0694c870d1ee4cda3b/extension-repo.json
  - DonationInterface 
https://gerrit.wikimedia.org/g/mediawiki/extensions/DonationInterface/+/27bd326f012c688d09c58460062841976a998649/extension.json#427
  
  Longer term, it seems that it would be nice to not use ExtensionRegistry so 
that we don't need to bootstrap MediaWiki to find tests that should be run 
(just use phpunit.xml.dist rules for discovering files), but that could be done 
later, as part of a different task.

TASK DETAIL
  https://phabricator.wikimedia.org/T298509

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: kostajh
Cc: kostajh, Jdforrester-WMF, Aklapper, Akuckartz, darthmon_wmde, DannyS712, 
lucamauri, Gq86, XenoRyet, Izno, Jrf, Wikidata-bugs, Dinoguy1000, ssastry, 
Arlolra, Jay8g
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org