Page MenuHomePhabricator

CollationFaTest errors in clean MW installation
Closed, ResolvedPublic


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.


Related Gerrit Patches:

Event Timeline

Huji created this task.Sep 16 2017, 2:44 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 16 2017, 2:44 PM
Huji updated the task description. (Show Details)Sep 16 2017, 2:48 PM
Huji closed this task as Invalid.Sep 16 2017, 2:54 PM

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

matmarex reopened this task as Open.Sep 16 2017, 3:27 PM
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() {
		if ( !extension_loaded( 'intl' ) ) {
			$this->markTestSkipped( "PHP extension 'intl' is not loaded, skipping." );
Huji added a comment.Sep 16 2017, 5:20 PM

Fair. I will work on a patch.

I agree with @matmarex's assesment

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

Huji claimed this task.Sep 16 2017, 8:30 PM
matmarex closed this task as Resolved.Sep 17 2017, 4:56 PM
matmarex removed a project: Patch-For-Review.

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