The different action classes, retrieved from Action::factory, should instead be constructed from a dedicated factory service that has an object factory and provides each action the services it needs.
Actions used by services (I may have missed some):
ContentLanguage (HistoryAction, InfoAction, RevertAction) HookContainer (FormAction, EditAction, HistoryAction, InfoAction, RawAction, ViewAction, WatchAction) IContentHandlerFactory (RollbackAction) ILoadBalancer (HistoryAction, InfoAction, both via wfGetDB) LanguageNameUtils (InfoAction) LinkBatchFactory (HistoryAction, InfoAction) LinkRenderer (CreditsAction, HistoryAction, InfoAction, MarkpatrolledAction) MagicWordFactory (InfoAction) MainWANObjectCache (InfoAction) NamespaceInfo (InfoAction) PageProps (InfoAction, via PageProps::getInstance) Parser (RawAction) PermissionManager (HistoryAction, InfoAction, McrUndoAction, RawAction, WatchAction) RepoGroup (InfoAction, RevertAction) RevisionLookup (InfoAction, McrUndoAction, RawAction) RevisionRenderer (McrUndoAction) RevisionStore (HistoryAction, McrUndoAction) SpecialPageFactory (SpecialPageAction) UserFactory (CreditsAction, InfoAction, RawAction, all via User::newFromName) UserOptionsLookup (RollbackAction, via User::getOption) WatchedItemStore (InfoAction, WatchAction) WatchlistNotificationManager (HistoryAction) WikiPageFactory (WatchAction) Don't exist yet, but: RestrictionStore (InfoAction, RawAction)
SpecialPageFactory::getPage can be used as a model for the desired ActionFactory::getAction