Following T214557 and T245547 Wikibase code operates in the "entity source based federation" mode any way, hence the conditional logic is redundant.
- Update RepoHooks: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/569334 and https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/569330
- Update HtmlPageLinkRendererBeginHookHandler: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/572284
- Update SearchEntities API class: