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.
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):
- InfoAction https://gerrit.wikimedia.org/r/c/mediawiki/core/+/674908
- WatchAction https://gerrit.wikimedia.org/r/c/mediawiki/core/+/674894
- WikiExporter https://gerrit.wikimedia.org/r/c/mediawiki/core/+/678253
- HTMLForm (will have to convert to Title until Title.:getLocalURL has been extracted; deprecating getTitle will take more work)
- TextboxBuilder (internal conversion needs ProtectetionManager)
- MediaWiki\EditPage\Constraint\* (some should have the content model injected instead of the Title)
- RepoGroup https://gerrit.wikimedia.org/r/c/mediawiki/core/+/678267
- FileRepo https://gerrit.wikimedia.org/r/c/mediawiki/core/+/678274
- File (maybe - more investigation needed)
- HTMLFileCache https://gerrit.wikimedia.org/r/c/mediawiki/core/+/678252
- BacklinkCache
- MessageCache
- WikiImporter (careful about the callbacks, though)
- User https://gerrit.wikimedia.org/r/c/mediawiki/core/+/678045
- RecentChange https://gerrit.wikimedia.org/r/c/mediawiki/core/+/678279
- ResourceLoader https://gerrit.wikimedia.org/r/c/mediawiki/core/+/685580
- ...
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
- ...