Page MenuHomePhabricator

Fix mediawiki/libs/Equivset so that its tests pass in PHP 8.4, and enable in CI
Closed, ResolvedPublic

Description

https://integration.wikimedia.org/ci/job/composer-package-php84/70/console

00:00:14.401 There was 1 warning:
00:00:14.401 
00:00:14.401 1) Wikimedia\Equivset\EquivsetTest::testLoadFailNoPhpFile
00:00:14.403 Expecting E_ERROR and E_USER_ERROR is deprecated and will no longer be possible in PHPUnit 10.
00:00:14.404 
00:00:14.404 --
00:00:14.404 
00:00:14.404 There was 1 failure:
00:00:14.404 
00:00:14.404 1) Wikimedia\Equivset\EquivsetCompletenessTest::testIncludeUpperLower
00:00:14.404 Failed asserting that two strings are identical.
00:00:14.404 --- Expected
00:00:14.404 +++ Actual
00:00:14.404 @@ @@
00:00:14.404 -''
00:00:14.404 +'Upper case character "A7DC Ƛ" not in the set (mapping based on lower case character is "39B Λ")
00:00:14.404 +Upper case character "A7CB Ɤ" not in the set (mapping based on lower case character is "59 Y")
00:00:14.404 +'
00:00:14.404 
00:00:14.404 /src/tests/EquivsetCompletenessTest.php:63
00:00:14.404 
00:00:14.404 FAILURES!
00:00:14.404 Tests: 39, Assertions: 9224, Failures: 1, Warnings: 1.

Event Timeline

Jdforrester-WMF renamed this task from Fix mediawiki/libs/Equivset so that its tests pass in PHP 8.3, and enable in CI to Fix mediawiki/libs/Equivset so that its tests pass in PHP 8.4, and enable in CI.
00:00:14.401 There was 1 warning:
00:00:14.401 
00:00:14.401 1) Wikimedia\Equivset\EquivsetTest::testLoadFailNoPhpFile
00:00:14.403 Expecting E_ERROR and E_USER_ERROR is deprecated and will no longer be possible in PHPUnit 10.
00:00:14.404

This is not php8.4, it's PHPUnit 10 (T328919), affects other libs as well (like T363641: IPUtils: Expecting E_WARNING and E_USER_WARNING is deprecated and will no longer be possible in PHPUnit 10)

--> T362858: equivset: Expecting E_ERROR and E_USER_ERROR is deprecated

Change #1125490 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/libs/Equivset@master] Add a few more look-alikes from Latin Extended-D range

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

00:00:14.401 There was 1 warning:
00:00:14.401 
00:00:14.401 1) Wikimedia\Equivset\EquivsetTest::testLoadFailNoPhpFile
00:00:14.403 Expecting E_ERROR and E_USER_ERROR is deprecated and will no longer be possible in PHPUnit 10.
00:00:14.404

This is not php8.4, it's PHPUnit 10 (T328919), affects other libs as well (like T363641: IPUtils: Expecting E_WARNING and E_USER_WARNING is deprecated and will no longer be possible in PHPUnit 10)

--> T362858: equivset: Expecting E_ERROR and E_USER_ERROR is deprecated

Yes, sorry, I copied it for completeness but it was the failure I cared about, not the warning. Thanks for splitting!

Change #1125490 merged by jenkins-bot:

[mediawiki/libs/Equivset@master] Add a few more look-alikes from Latin Extended-D range

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

Change #1125516 had a related patch set uploaded (by Jforrester; author: Jforrester):

[integration/config@master] Zuul: [mediawiki/libs/Equivset] Enable PHP 8.4 as voting

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

Change #1125516 merged by jenkins-bot:

[integration/config@master] Zuul: [mediawiki/libs/Equivset] Enable PHP 8.4 as voting

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

Mentioned in SAL (#wikimedia-releng) [2025-03-07T20:07:04Z] <James_F> Zuul: [mediawiki/libs/Equivset] Enable PHP 8.4 as voting, for T387806

Change #1125517 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/vendor@master] Upgrade wikimedia/equivset from 1.7.0 to 1.7.1 for PHP 8.4 support

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

Change #1125517 merged by jenkins-bot:

[mediawiki/vendor@master] Upgrade wikimedia/equivset from 1.7.0 to 1.7.1 for PHP 8.4 support

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

Thanks for the new release.

Just as note: Technically the new version is not needed to run MediaWiki with php8.4. The test just validates that any letter in equivset is represented with it's lowercase/uppercase pair, the new php version brings new unicode mappings and the test fails.

Thanks for the new release.

Just as note: Technically the new version is not needed to run MediaWiki with php8.4. The test just validates that any letter in equivset is represented with it's lowercase/uppercase pair, the new php version brings new unicode mappings and the test fails.

Yup, I just didn't want the behaviour to change unexpectedly when a new version of Equivset came out after we announced "PHP 8.4 compatibility" in MW.