Page MenuHomePhabricator

MediaWiki core interface change breaks CentralAuth
Closed, ResolvedPublic

Description

I have triggered a build for AbuseFilter with the following dependencies:

AntiSpoof
CentralAuth
CheckUser
CodeEditor
ConfirmEdit
Echo
EventLogging
Renameuser
Scribunto
WikiEditor

The build failed with:

PHP Fatal error: 
Declaration of
MediaWiki\Extension\CentralAuth\Special\SpecialGlobalGroupMembership::makeConflictCheckKey(): string
must be compatible with
MediaWiki\SpecialPage\UserGroupsSpecialPage::makeConflictCheckKey(MediaWiki\User\UserGroupsSpecialPageTarget $target): string
 in /workspace/src/extensions/CentralAuth/includes/Special/SpecialGlobalGroupMembership.php on line 604

I went to check the signatures and they were strictly identical in master:

core/includes/specialpage/UserGroupsSpecialPage.php:	abstract protected function makeConflictCheckKey(): string;
core/includes/specials/SpecialUserRights.php:	protected function makeConflictCheckKey(): string {
extensions/CentralAuth/includes/Special/SpecialGlobalGroupMembership.php:	protected function makeConflictCheckKey(): string {

The log is kept at https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php81/41083/console

I looked at the history of the function in both repositories and they never changed.

Eventually I found a non merged change that refactors the signature:
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CentralAuth/+/1193021/6/includes/Special/SpecialGlobalGroupMembership.php

Which mean the pending code was injected in the build OR that its phpunit test results were reused. Both case sounds quite wrong :]

Event Timeline

hashar added subscribers: • hector.arroyo, mszwarc.

Verifying the CI checkout. From the build log:

17:12:00 INFO:zuul.Cloner:Prepared mediawiki/core repo with branch master at commit 7a633cf8f02c0e16f697e70ab85d9dea796441c2
17:12:18 INFO:zuul.Cloner.mediawiki/extensions/CentralAuth:Prepared mediawiki/extensions/CentralAuth repo with branch master at commit 66e10f75115d4e60d18e7cbc6f273a184152d6fa

For CentralAuth:

$ git grep 'function makeConflictCheckKey' 66e10f75115d4e60d18e7cbc6f273a184152d6fa
66e10f75115d4e60d18e7cbc6f273a184152d6fa:includes/Special/SpecialGlobalGroupMembership.php:     protected function makeConflictCheckKey(): string {

For core:

$ git grep 'function makeConflictCheckKey' 7a633cf8f02c0e16f697e70ab85d9dea796441c2
7a633cf8f02c0e16f697e70ab85d9dea796441c2:includes/specialpage/UserGroupsSpecialPage.php:        abstract protected function makeConflictCheckKey( UserGroupsSpecialPageTarget $target ): string;
7a633cf8f02c0e16f697e70ab85d9dea796441c2:includes/specials/SpecialUserRights.php:       protected function makeConflictCheckKey( UserGroupsSpecialPageTarget $target ): string {

That is https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1193019 that got merged, and it did not break because it is not tested with mediawiki/core.
Anything relaying on CentralAuth and CentralAuth itself are broken until https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CentralAuth/+/1193316 get merged.

hashar renamed this task from PHPUnit result cache polluted by pending changes to MediaWiki core interface change breaks CentralAuth.Oct 3 2025, 3:57 PM
hashar removed subscribers: kostajh, ArthurTaylor.

This patch, which has already been submitted, fixed the signature in CentralAuth: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CentralAuth/+/1193021

Daimona assigned this task to mszwarc.
Daimona subscribed.

CentralAuth and dependent extensions got fixed by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CentralAuth/+/1193021, as confirmed in r1193442. But the thing I ask myself is:

How many times must CA break CI
Before we add it to the gate?
The answer, my friend, is in T333541

Thank you very much and for referencing the task about CentralAuth not being in the gate.