Page MenuHomePhabricator

Replace Title parameters with PageIdentity (straight forward cases)
Open, HighPublic

Description

As a first step of moving the code base away from Title, towards PageIdentity, we need to make methods that currently expect a Title instance accept a PageIdentity instance instead. This is generally safe, since every Title is a PageIdentity, so callers do not need to change. Ideally, the implementation of the method will work directly on the PageIdentity, but converting back to a Title is acceptable (via an injected TitleFactory, or the static cast method on Title). See the strategy outlined on Platform_Engineering_Team/Expedition for details.

NOTE: Methods that are stable to override (explicitly or implicitly because they are abstract on a class that is stable to extend) cannot be changed in this way!

The idea is that we can convert more code to not use Title when we have more interfaces that do not require Title. So the strategy is to work from the public interfaces inward.

Straight forwards cases (presumably - always check for pitfalls):

Known hard cases that need further investigation (please link tickets where appropriate):

  • Parser, ParserOutput, ParserOptions, PPFrame and friends
  • Remaining parts of RevisionStore
  • Content, ContentHandler (stable to override)
  • PrefixSearch (stable to override)
  • SearchResult and subclasses
  • ...

Details

ProjectBranchLines +/-Subject
mediawiki/extensions/FlaggedRevsmaster+43 -56
mediawiki/extensions/FlaggedRevsmaster+5 -8
mediawiki/extensions/FlaggedRevsmaster+41 -35
mediawiki/extensions/FlaggedRevsmaster+22 -5
mediawiki/coremaster+36 -27
mediawiki/coremaster+36 -30
mediawiki/coremaster+35 -31
mediawiki/coremaster+256 -32
mediawiki/coremaster+94 -69
mediawiki/coremaster+29 -19
mediawiki/coremaster+88 -15
mediawiki/coremaster+250 -109
mediawiki/coremaster+35 -19
mediawiki/coremaster+62 -6
mediawiki/coremaster+135 -51
mediawiki/coremaster+144 -53
mediawiki/extensions/Wikibasemaster+6 -3
mediawiki/coremaster+98 -8
mediawiki/coremaster+15 -8
Show related patches Customize query in gerrit

Related Objects

StatusSubtypeAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenFeatureNone
OpenBUG REPORTNone
OpenNone
StalledNone
OpenFeatureNone
DuplicateNone
ResolvedNone
OpenNone
OpenNone
OpenFeatureNone
OpenNone
ResolvedNone
ResolvedNone
OpenFeatureNone
StalledNone
OpenNone
OpenNone
Opendaniel
OpenNone
OpenNone
OpenNone
ResolvedNone
Resolveddaniel
Resolveddaniel
Resolveddaniel
OpenNone
Resolveddaniel
Resolveddaniel
ResolvedJdforrester-WMF
ResolvedPRODUCTION ERRORUmherirrender
Resolveddaniel
Resolveddaniel
Resolveddaniel

Event Timeline

Change 678013 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] Remove Title from public interface of OutputPage

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

Change 678045 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] WIP: Remove Title from method signatures in User

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

Change 678252 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] HTMLFileCache: replace Title in method signatures

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

Change 678253 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] WikiExporter: replace Title in method signatures

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

Change 678267 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] RepoGroup: replace Title in method signatures

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

Change 678274 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] FileRepo: replace Title in method signatures

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

Change 678279 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] RecentChange: replace Title in method signatures

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

daniel triaged this task as High priority.Apr 9 2021, 5:33 PM
daniel updated the task description. (Show Details)

Change 678253 merged by jenkins-bot:

[mediawiki/core@master] WikiExporter: replace Title in method signatures

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

Change 679407 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/extensions/Wikibase@master] Don't set RecentChange::mTitle in tests

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

Change 678252 merged by jenkins-bot:

[mediawiki/core@master] HTMLFileCache: replace Title in method signatures

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

Change 679407 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Don't set RecentChange::mTitle in tests

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

Change 678013 merged by jenkins-bot:

[mediawiki/core@master] Remove Title from public interface of OutputPage

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

Change 678045 merged by jenkins-bot:

[mediawiki/core@master] Remove Title from method signatures in User

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

Change 678267 merged by jenkins-bot:

[mediawiki/core@master] RepoGroup: replace Title in method signatures

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

Change 678274 merged by jenkins-bot:

[mediawiki/core@master] FileRepo: replace Title in method signatures

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

Change 682144 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] LinkBatch: replace Title with PageReference in method signatures

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

Change 678279 merged by jenkins-bot:

[mediawiki/core@master] RecentChange: replace Title in method signatures

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

Change 682144 merged by jenkins-bot:

[mediawiki/core@master] LinkBatch: replace Title with PageReference in method signatures

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

Change 683904 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] ApiPageSet: replace Title in method signatures

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

Change 683915 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] ImportReporter: replace Title in method signatures

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

Change 686626 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] LogPager: replace Title in method signatures

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

Change 686776 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] HTMLForm: accept PageReference instead of Title.

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

Change 686785 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] Deferred updates: remove Title from method signatures.

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

daniel updated the task description. (Show Details)

Change 685580 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] ResourceLoader: remove Title from public interface

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

Change 686776 merged by jenkins-bot:

[mediawiki/core@master] HTMLForm: accept PageReference instead of Title.

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

Change 686626 merged by jenkins-bot:

[mediawiki/core@master] LogPager: replace Title in method signatures

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

Change 686785 merged by jenkins-bot:

[mediawiki/core@master] Deferred updates: remove Title from method signatures.

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

Change 683904 merged by jenkins-bot:

[mediawiki/core@master] ApiPageSet: replace Title in method signatures

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

Change 683915 merged by jenkins-bot:

[mediawiki/core@master] ImportReporter: replace Title in method signatures

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

Change 685580 merged by jenkins-bot:

[mediawiki/core@master] resourceloader: Remove Title from public interfaces

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

Change by Daniel Kinzler:

[mediawiki/core@master] RevisionDeleter: Use PageIdentity instead of Title

https://gerrit.wikimedia.org/r/c/mediawiki/core/+/685570

Change 775891 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/FlaggedRevs@master] Introduce newInstance taking base PageIdentity

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

Change 775981 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/FlaggedRevs@master] Use FlaggableWikiPage::newInstance everywhere

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

Change 775982 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/FlaggedRevs@master] Refactor remaining methods to accept PageIdentity

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

Change 776165 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/FlaggedRevs@master] Deprecate the FlaggableWikiPage constructor

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

Change 776165 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@master] Deprecate the FlaggableWikiPage constructor

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