Page MenuHomePhabricator

SingleEntitySourceServices should only be created with callbacks for the types supported by the entity source.
Open, Needs TriagePublic

Description

Identified during review of https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/575308/

Why does SingleEntitySourceServices in
https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/575308/2/repo/includes/WikibaseRepo.php
get all service callbacks for all defined entity types?

Conveniently this doesn't cause us problems right now but conceptually it is odd.
These callbacks should be filtered either before construction or before being used so that only the callbacks for the types supported by the entity source are actually used.