Page MenuHomePhabricator

Bogus PhanPluginDuplicateArrayKey error in mediawiki-config
Closed, DuplicatePublic

Description

gerrit 1235552 caused this error:

21:15:41 wmf-config/InitialiseSettings.php:5650 PhanPluginDuplicateArrayKey Duplicate/Equivalent array key value('wgWMCEmailAuthEnforce') detected in array - the earlier entry 'wgWMCEmailAuthEnforce' at line 5646 will be ignored.

even though wgWMCEmailAuthEnforce is only present once, and not even changed by the patch.

Event Timeline

(Also, why is it only being checked during the gate pipeline, not during normal tests?)

Tgr renamed this task from Bogus PhanPluginDuplicateArrayKey error in MediaWiki-config to Bogus PhanPluginDuplicateArrayKey error in mediawiki-config.Mar 9 2026, 8:31 PM

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

[operations/mediawiki-config@master] build: Upgrade mediawiki-phan-config from 0.18.0 to 0.19.0

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

(Also, why is it only being checked during the gate pipeline, not during normal tests?)

It isn't. CI runs composer test which is defined as running phan for all runs.

I cannot replicate your CI failure locally. I've pushed a patch to bump Phan to the current version; if that fixes it, let's land that?

Could be a bad zuul merge between master and the patch set (due to the chain of patch sets),
when it still happens after rebase (that also happen with the phan update), this would be bogus, but not before

T400918: Zuul does not support Gerrit rebase submit strategy correctly, may merge deterministically broken code (breaking all subsequent CI) or report spurious merge conflicts

Reproducable when fetching patch set 2 and merging master into the new branch (without rebase)

With the (new) merge strategy it is necessary to rebase a chain of open patch sets when the last merged patch set was not fast-forward.

Thanks for investigating!

So IIUIC the error will go away if I just rebase the patch via the Gerrit interface?

In this case: Yes, the error is gone after rebase to current master (as the chain is gone)

Change #1249393 merged by jenkins-bot:

[operations/mediawiki-config@master] build: Upgrade mediawiki-phan-config from 0.18.0 to 0.20.0

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