Page MenuHomePhabricator

Inject dependencies into RevDelList classes
Closed, ResolvedPublic

Description

RevisionDeleter::createList creates the objects with new $class( $context, $title, $ids );
It should be possible to inject dependencies too; none of the classes are newable or stable to extend

Dependencies to inject

  • RevDelArchiveList (extends RevDelRevisionList) + RevisionStore
  • RevDelFileList - RepoGroup, HtmlCacheUpdater
  • RevDelList (base, extended by all) - DBLoadBalancerFactory
  • RevDelLogList - CommentStore, ActorMigration
  • RevDelRevisionList - HookContainer, RevisionStore, DBLoadBalancer (via wfGetDB), HtmlCacheUpdater, MainWANObjectCache

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 643163 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Add dependency injection to RevDelList classes

https://gerrit.wikimedia.org/r/643163

Change 643163 merged by jenkins-bot:
[mediawiki/core@master] Add dependency injection to RevDelList classes

https://gerrit.wikimedia.org/r/643163