Page MenuHomePhabricator

Returning type \Wikimedia\Rdbms\DBConnRef but getUserDB() is declared to return \Wikimedia\Rdbms\IMaintainableDatabase
Closed, DuplicatePublic

Description

Problem
When making a change to MediaWiki-extensions-CentralAuth this error is thrown by the CI:

<file name="maintenance/deleteLocalPasswords.php">
    <error line="61" severity="warning" message="Returning type \Wikimedia\Rdbms\DBConnRef but getUserDB() is declared to return \Wikimedia\Rdbms\IMaintainableDatabase" source="PhanTypeMismatchReturn"/>
</file>

or more clearly:

Returning type \Wikimedia\Rdbms\DBConnRef but getUserDB() is declared to return \Wikimedia\Rdbms\IMaintainableDatabase

in the file: maintenance/deleteLocalPasswords.php

Details

Related Gerrit Patches:
mediawiki/extensions/CentralAuth : masterReplace use of wfGetDB() with Maintenance::getDB()

Event Timeline

dbarratt created this task.Aug 2 2019, 7:27 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 2 2019, 7:27 PM

Change 527620 had a related patch set uploaded (by Dbarratt; owner: Dbarratt):
[mediawiki/extensions/CentralAuth@master] Replace use of wfGetDB() with Maintenance::getDB()

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

Change 527620 merged by jenkins-bot:
[mediawiki/extensions/CentralAuth@master] Replace use of wfGetDB() with Maintenance::getDB()

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

Change 527630 had a related patch set uploaded (by Dbarratt; owner: Dbarratt):
[mediawiki/extensions/CentralAuth@master] Bust the database connection cache.

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

Niharika changed the task status from Duplicate to Resolved.Aug 5 2019, 9:25 PM