Nothing Special   »   [go: up one dir, main page]

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>

Event Timeline

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

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 edited projects, added Performance-Team; removed Patch-For-Review.
Krinkle moved this task from Untriaged to Rdbms library on the MediaWiki-libs-Rdbms board.

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