The FederatedPropertiesServiceFactory (service name) / ApiServiceFactory (class name) was already moved to the service container in T279663, but it doesn’t behave like a proper service yet. Specifically:
- Two of the services it creates are stored in static fields. Those static fields can be reset with its resetClassStatics(), which is called from WikibaseRepo’s own method of the same name. I’m pretty sure this is the reason of the test failures we’re seeing in T278011: Stop using the MediaWikiPHPUnitTest::startTest hook in Wikibase; the fields should be non-static, so that the lifetime of the services is automatically bound to the lifetime of the factory.
- It gets several other services from global state rather than having them injected:
The first issue is the most important one to resolve, but the other one should hopefully not be too difficult either.