UnblockUser::unblockUnsafe makes a call to User::idFromName. This led to discussions about injecting a UserFactory into UnblockUser, but it may be preferable to remove the call, since it seems unnecessary.
The target is set by AbstractBlock::parseTarget, which always sets it to a User if passed a valid username string. If the target is not an instance of a User, then it can't be a valid username, in which case idFromName will return null, and RevisionDeleteUser::unsuppressUserName will just do nothing. We could simplify this by changing the condition for executing this block to:
$block->getHideName() && $block->getTarget() instanceof User