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

D3r1ck01 created this task.Apr 15 2019, 9:19 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 15 2019, 9:19 PM
Reedy updated the task description. (Show Details)Apr 15 2019, 9:20 PM
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.
Krinkle removed a subscriber: Krinkle.Apr 15 2019, 9:28 PM
Florian claimed this task.May 18 2019, 6:41 PM

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

Florian closed this task as Resolved.May 19 2019, 8:45 AM

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