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 
<https://phabricator.wikimedia.org/rMW1d7221d066c01c3fa6fb3e539cebd9fe7a91550f> 
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

Reply via email to