Page MenuHomePhabricator

In File and FileRepo, replace usage of Title with usage of LinkTarget and PageIdentity
Open, MediumPublic2 Estimated Story Points

Description

File should not depend on the Title class, to reduce coupling and avoid circular dependencies. As a first step, it would be sufficient to remove all usages of Title in the public interface of File and FileRepo, while resorting to downcasts to obtain a Title instance where necessary in the implementation. All usages of Title in File and FileRepo should however be considered technical debt.

Special care must be taken when introducing cross-wiki awareness into classes used to access files on other wikis, such as ForeignDBFile or ForeignAPIFileRepo. While we should make use of the cross-wiki functionality in PageIdentity and LinkTarget, existing code that relies on the Title class must remain functional when using a Title in the context of another wiki.

Event Timeline

Change 502510 had a related patch set uploaded (by simetrical; owner: simetrical):
[mediawiki/core@master] Convert File to use LinkTarget

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

CCicalese_WMF set the point value for this task to 2.Apr 15 2019, 3:05 PM

Pushing that back to "later", because we hit some snacks:

daniel renamed this task from Replace usage of Title with usage of LinkTarget in File to In File and FileRepo, replace usage of Title with usage of LinkTarget and PageIdentity .Mar 9 2021, 10:03 AM
daniel updated the task description. (Show Details)

Change 670127 had a related patch set uploaded (by Daniel Kinzler; owner: Daniel Kinzler):
[mediawiki/core@master] WIP: Use PageIdentity in File and FileRepo

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

daniel triaged this task as Medium priority.

@daniel: Per emails from Sep18 and Oct20 and https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup , I am resetting the assignee of this task because there has not been progress lately (please correct me if I am wrong!). Resetting the assignee avoids the impression that somebody is already working on this task. It also allows others to potentially work towards fixing this task. Please claim this task again when you plan to work on it (via Add Action...Assign / Claim in the dropdown menu) - it would be welcome. Thanks for your understanding!