Page MenuHomePhabricator

Definition of IDatabase::buildLike doesn't match Database::buildLike
Closed, DuplicatePublic

Description

Database.php:

	public function buildLike( $param, ...$params ) {

IDatabase.php

	public function buildLike( $param );

Seems to be since https://github.com/wikimedia/mediawiki/commit/725a59f0c70e37de6de8e26f91b0101839d37ff9

This is needed in order for Phan not to consider calls to IDatabase::buildLike as invalid. Interestingly, it does not consider calls to Database::buildLike invalid.

It seems it's not liked now.. From https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Jade/+/511080/ see https://integration.wikimedia.org/ci/job/mwext-php72-phan-docker/353/console

00:31:38 <checkstyle version="6.5">
00:31:38   <file name="maintenance/CleanJudgmentLinks.php">
00:31:38     <error line="171" severity="info" message="Call with 2 arg(s) to \Wikimedia\Rdbms\IDatabase::buildLike() which only takes 1 arg(s) defined at ../../includes/libs/rdbms/database/IDatabase.php:1226" source="PhanParamTooMany"/>
00:31:38   </file>
00:31:38 </checkstyle>

Details

Related Gerrit Patches:

Event Timeline

Reedy created this task.Jun 20 2019, 11:38 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 20 2019, 11:38 PM
Reedy updated the task description. (Show Details)Jun 20 2019, 11:40 PM
Reedy updated the task description. (Show Details)Jun 20 2019, 11:42 PM
Reedy updated the task description. (Show Details)Jun 21 2019, 12:28 AM
Reedy added a subscriber: Umherirrender.

Change 518320 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] rdbms: Type IDatabase::buildLike param as variadic to Phan

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

Krinkle triaged this task as Low priority.Jun 22 2019, 9:03 PM

Change 518320 merged by jenkins-bot:
[mediawiki/core@master] rdbms: Type IDatabase::buildLike param as variadic to Phan

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

Krinkle closed this task as Resolved.Jun 24 2019, 10:59 PM
Krinkle edited projects, added Performance-Team; removed Patch-For-Review.
Krinkle moved this task from Untriaged to Rdbms library on the Wikimedia-Rdbms board.
Reedy added a comment.Jun 28 2019, 1:20 PM

This is still failing on the same JADE patch...

https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Jade/+/511080/
https://integration.wikimedia.org/ci/job/mwext-php72-phan-docker/995/console

14:09:11 <?xml version="1.0" encoding="ISO-8859-15"?>
14:09:11 <checkstyle version="6.5">
14:09:11   <file name="maintenance/CleanJudgmentLinks.php">
14:09:11     <error line="171" severity="info" message="Call with 2 arg(s) to \Wikimedia\Rdbms\IDatabase::buildLike() which only takes 1 arg(s) defined at ../../includes/libs/rdbms/database/IDatabase.php:1234" source="PhanParamTooMany"/>
14:09:11   </file>
14:09:11 </checkstyle>

Change 519728 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] rdbms: Type IDatabase::buildLike param as variadic to Phan (really)

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

Krinkle reopened this task as Open.Jun 28 2019, 10:51 PM