- Simple cases should migrate to ICP:
- $dbr = MediaWikiServices::getInstance()->getConnectionProvider()->getReplicaDatabase();
- $dbw = MediaWikiServices::getInstance()->getConnectionProvider()->getPrimaryDatabase();
- In rare cases where you use unusual features, you can use MediaWikiServices::getInstance()->getDBLoadBalancer()->getConnection( DB_PRIMARY ) etc. as a drop-in replacement, but this too will soon be deprecated (T330641)
- Soft-deprecate (there's a "TODO" but no @deprecated, let alone migration documentation).
- Replace uses in Wikimedia-deployed code
- Hard-deprecate (in 1.42)
-
[Maybe?] Make mediawiki-codesniffer complain it and add an automatic TODO to use DI - Check there aren't too many remaining uses in the MediaWiki ecosystem
- Remove in 1.44
As a super-critical function, we're going to want to wait at least two cycles after the hard deprecation before removal.