⚓ T333815 PHP 8.1: Parser tests fail reliably when unrelated Wikibase special page test is run with `null` as the subpage
Page MenuHomePhabricator

PHP 8.1: Parser tests fail reliably when unrelated Wikibase special page test is run with `null` as the subpage
Open, Needs TriagePublic

Description

When executing a test-case for the Wikibase Special page Special:EntityData with null instead of the empty string '' as the subpage, then completely unrelated(!) mediawiki-core(!!) parser tests fail in CI. This happens only on PHP 8.1 (8.0 and 7.4 are fine).

Example from https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php81-noselenium-docker/8576/console:

00:14:04.921 57) ParserIntegrationTest::testParse with data set "bookReferencing.txt: Intervening ref before extends" ('legacy')
00:14:04.921 Failed asserting that two strings are equal.
00:14:04.922 --- Expected
00:14:04.922 +++ Actual
00:14:04.922 @@ @@
00:14:04.923 -'<p><sup id="cite_ref-a_1-0" class="reference"><a href="#cite_note-a-1">&#91;1&#93;</a></sup>\n
00:14:04.923 -<sup id="cite_ref-2" class="reference"><a href="#cite_note-2">&#91;2&#93;</a></sup>\n
00:14:04.924 -<sup id="cite_ref-3" class="reference"><a href="#cite_note-3">&#91;1.1&#93;</a></sup>\n
00:14:04.924 +'<p><sup id="cite_ref-a_1-0" class="reference"><a href="#cite_note-a-1">&#91;($*)&#93;</a></sup>\n
00:14:04.924 +<sup id="cite_ref-2" class="reference"><a href="#cite_note-2">&#91;&lt;span class=&quot;error mw-ext-cite-error&quot; lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Cite error: Ran out of custom link labels for group &quot;&quot;. Define more in the &#91;&#91;MediaWiki:cite_link_label_group-&#93;&#93; message.&lt;/span&gt;&#93;</a></sup>\n
00:14:04.925 +<sup id="cite_ref-3" class="reference"><a href="#cite_note-3">&#91;($*).1&#93;</a></sup>\n
00:14:04.925  </p>\n
00:14:04.926  <div class="mw-references-wrap"><ol class="references">\n
00:14:04.926  <li id="cite_note-a-1"><span class="mw-cite-backlink"><a href="#cite_ref-a_1-0">↑</a></span> <span class="reference-text">book</span>\n

Note that some message(?) changed from 1 to ($*).

This can be reproduced with change https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/900382 - PS 2 and 4 (with null) show the error, PS 3 (with '') doesn't. (Comment check php to run the PHP 8.1 tests which are otherwise only part of gate-and-submit but not normal test builds.)

Event Timeline

Change 900382 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/Wikibase@master] Add test for Special:EntityData with `null` subpage

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

Change 900382 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/Wikibase@master] Add test for Special:EntityData with `null` subpage

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

Change 900382 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Add test for Special:EntityData with `null` subpage

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