Page MenuHomePhabricator

Convert SiteStats to a service with dependency injection
Open, LowPublic

Description

Currently, SiteStats is entirely static (documented as Static accessor class for site_stats and related things) forcing it to retrieve dependencies from mediawiki services.

I propose that it be converted to a service, similar to how MWNamespace's static methods were converted to a NamespaceInfo service

Dependencies to be injected:

  • DBLoadBalancer
  • LoggerInstance (currently uses wfDebug)
  • MainWANObjectCache
  • JobQueueGroup
  • the config value of MiserMode