Page MenuHomePhabricator

Inject services into SpecialSecurePollLog and SecurePollLogPager (OT)
Closed, ResolvedPublic

Description

SecurePollLogPager uses static methods on the User class which simply call methods on the UserFactory service.

Instead we should inject the UserFactory into SpecialSecurePollLog and pass it to SecurePollLogPager.

Motivation and context for this type of change can be found here: https://www.mediawiki.org/wiki/Dependency_Injection

What needs to be done:

  • Inject UserFactory into the SpecialSecurePollLog constructor. See SpecialPageFactory::CORE_LIST for how to do this.
  • Pass UserFactory on through to SecurePollLogPager
  • In SecurePollLogPager, replace calls to static methods on the User class with their equivalents in UserFactory

Event Timeline

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

Change 662738 had a related patch set uploaded (by Wikitrent; owner: Wikitrent):
[mediawiki/extensions/SecurePoll@master] Inject services into SpecialSecurePollLog and SecurePollLogPager

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

Change 662738 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Inject services into SpecialSecurePollLog and SecurePollLogPager

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