Page MenuHomePhabricator

Wikibase CI errors: Cannot declare class HooksTest, because the name is already in use
Closed, ResolvedPublic

Description

E.g. in this wikibase-client-docker build for gate-and-submit in this Wikibase change:

PHP Fatal error:  Cannot declare class HooksTest, because the name is already in use in /workspace/src/extensions/Scribunto/tests/phpunit/HooksTest.php on line 5

Probably caused by this Scribunto change, which “namespace[d] LuaCommon” and renamed ScribuntoHooksTest to HooksTest without actually adding a namespace to it; the other \HooksTest class is probably in core.

Event Timeline

Blocks CI, probably for more than one extension ⇒ UBN!

Change 820093 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Scribunto@master] Add namespace to HooksTest

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

Change 819793 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Scribunto@master] Revert "Namespace LuaCommon"

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

Change 819793 merged by jenkins-bot:

[mediawiki/extensions/Scribunto@master] Revert "Namespace LuaCommon"

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

Change 820093 abandoned by Lucas Werkmeister (WMDE):

[mediawiki/extensions/Scribunto@master] Add namespace to HooksTest

Reason:

we reverted the whole change instead (I8b15132723)

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

Lucas_Werkmeister_WMDE lowered the priority of this task from Unbreak Now! to High.Aug 3 2022, 10:36 AM
Lucas_Werkmeister_WMDE added subscribers: Krinkle, Reedy.

Probably fixed, so no longer UBN; will close once a Wikibase change goes through gate-and-submit. (And then @Reedy and @Krinkle will want to retry the namespacing, I guess – it would be great to test it with a depending Wikibase change this time.)

Wikibase CI seems to be fixed again.