Page MenuHomePhabricator

ResourcesTest::testMissingDependencies: Failed asserting that an array contains 'schema.UniversalLanguageSelector'.
Closed, ResolvedPublic

Description

Currently enabled/installed stuff

  1. ResourcesTest::testMissingDependencies

The module 'schema.UniversalLanguageSelector' required by 'ext.uls.eventlogger' must exist
Failed asserting that an array contains 'schema.UniversalLanguageSelector'.

/srv/vagrant/mediawiki/tests/phpunit/structure/ResourcesTest.php:72
/srv/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:133
/srv/vagrant/mediawiki/tests/phpunit/MediaWikiPHPUnitCommand.php:42
/srv/vagrant/mediawiki/tests/phpunit/phpunit.php:160


Attached:

Details

Reference
bz68955

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:42 AM
bzimport set Reference to bz68955.
bzimport added a subscriber: Unknown Object (MLST).

Since we are adding ext.uls.eventlogger conditionally this only shows up in the tests. ContentTranslation has the same issue btw.

Conditionally based on what? If it unconditionally registeres modules that depend on modules that only exist conditionally, that sounds like a bug that is not limited to a test suite, but a genuine bug.

Alternatively, it sounds like maybe a dependency isn't installed there (EventLogging?)

EventLogging is optional dependency. ext.uls.eventlogger is declared unconditionally but only added if event logging is enabled. schema.UniversalLanguageSelector is added conditionally if EventLogging is present, as it depends on that extension.

Please look at other extensions for usage examples. One aspect is that schema modules should typically not be depended on directly, especially if the dependent module is loaded directly on a page.

This was fixed by rEULS00349ab0ebf84505fd388fd5e2895a8bff41195f where the bug number was not included by mistake.

Nikerabbit claimed this task.