Page MenuHomePhabricator

CollationFaTest errors in clean MW installation
Closed, ResolvedPublic

Description

I just installed a brand new version of MediaWiki from git HEAD currently at ecefa8f10821, with no extensions or special configurations. After running composer update I ran the phpunit.php and got 9 errors all pertaining to the CollationFaTest::testGetFirstLetter complaining that "An ICU collation was requested, but the intl extension is not available."

The unit test was added by @Bawolff in May 2017.

Event Timeline

The issue was with my environment. sudo apt-get install php-intl solved it.

matmarex added a subscriber: matmarex.

This is probably nevertheless valid. I think we don't require php-intl for MediaWiki to run, so the test should skip itself when it's not installed. Like this I guess: (copied from XMLTest)

	protected function setUp() {
		parent::setUp();
		if ( !extension_loaded( 'intl' ) ) {
			$this->markTestSkipped( "PHP extension 'intl' is not loaded, skipping." );
		}
	}

Fair. I will work on a patch.

Change 378420 had a related patch set uploaded (by Huji; owner: Huji):
[mediawiki/core@master] Do not run CollationFaTest if 'intl' is not loaded

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

Change 378420 merged by jenkins-bot:
[mediawiki/core@master] Do not run CollationFaTest if 'intl' is not loaded

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