Page MenuHomePhabricator

Possible dead code in ConfigRepository.php
Closed, ResolvedPublic

Description

/** @var ConfigRepository $other */
$otherCurrentObj = $other->current();

The above code, not sure what it does. @Reedy thinks could be Iterable related but we're not sure. The SalvageableService interface doesn't declare current and also the interface doesn't extend the Iterable interface. Could this be a no-op or dead code?

Introduced in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/327312.

Event Timeline

Reedy renamed this task from Possible dead code in /includes/config/ConfigRepository.php to Possible dead code in ConfigRepository.php.Apr 15 2019, 9:24 PM
Reedy edited projects, added MediaWiki-Configuration; removed MediaWiki-General.
Reedy added a subscriber: Legoktm.

I'll take a look into it. It is totally possible that I simply missed tht during the implementation and changes of this feature :)

Change 511083 had a related patch set uploaded (by Florianschmidtwelzow; owner: Florianschmidtwelzow):
[mediawiki/core@master] Remove useless use of current and end

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

Change 511083 merged by jenkins-bot:
[mediawiki/core@master] Remove useless use of current and end

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

Change 511130 had a related patch set uploaded (by Reedy; owner: Florianschmidtwelzow):
[mediawiki/core@REL1_33] Remove useless use of current and end

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

Change 511132 had a related patch set uploaded (by Reedy; owner: Florianschmidtwelzow):
[mediawiki/core@REL1_32] Remove useless use of current and end

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

Change 511130 merged by jenkins-bot:
[mediawiki/core@REL1_33] Remove useless use of current and end

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

Change 511132 merged by jenkins-bot:
[mediawiki/core@REL1_32] Remove useless use of current and end

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