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 ([[ https://codesearch.wmcloud.org/deployed/?q=getActorId%5C(%5B%5E)%5D&i=nope&files=&excludeFiles=&repos= | codesearch ]])
 Hard deprecate calling UserIdentity::getActorId() with an IDatabase
The replacement is relatively simple: `MediaWikiService::getInstance()->getActorNormalization()->aquireActorId( $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.