User::getActorId() currently can take an IDatabase as a parameter. If it is provided and if the actor ID is not yet set, it will use the IDatabase to create an actor. This side effect causes complications now that UserIdentity supports foreign wikis. In some cases, UserIdentityValue::getActorId() has been passed an IDatabase as well.
Replace all occurrences of calling UserIdentity::getActorId() with an IDatabase (codesearch):
- SocialProfile (not Wikimedia deployed)
- Comments (not Wikimedia deployed)
- VoteNY (not Wikimedia deployed)
- WikiForum (not Wikimedia deployed)
- Hard deprecate calling UserIdentity::getActorId() with an IDatabase
The replacement is relatively simple: MediaWikiServices::getInstance()->getActorNormalization()->acquireActorId( $user ) if the call is done in the context of the local wiki. For foreign wikis if's more complex - but let's first survey if it's ever needed.