Page MenuHomePhabricator

[ES-M5] [TECH] Stop extending core actions in EntitySchema
Closed, ResolvedPublic

Description

See parent T287650: Stop extending core actions

Since dependencies can be injected into actions, we should inject them into all core actions. But, ViewAction is being extended, even though it is not stable to extend.

Acceptance Criteria

  • EntitySchema does not extend ViewAction *OR* ViewAction is stable to extend
  • Whichever class is created has it's dependencies injected

Event Timeline

ItamarWMDE renamed this task from Stop extending core actions in EntitySchema to [ES] Stop extending core actions in EntitySchema.Sep 20 2023, 3:03 PM
ItamarWMDE moved this task from Incoming to [DOT] By Project on the wmde-wikidata-tech board.

Prio Notes:

  • Does not affect end users / production
  • Does not affect monitoring
  • Might affect development
  • Might affect onboarding (moving from extension to injection)
  • Affect additional stakeholders (blocks developers working on core)
ItamarWMDE renamed this task from [ES] Stop extending core actions in EntitySchema to [ES-M5] Stop extending core actions in EntitySchema.Sep 26 2023, 1:58 PM
ItamarWMDE moved this task from [DOT] By Project to [DOT] Prioritized on the wmde-wikidata-tech board.
ItamarWMDE renamed this task from [ES-M5] Stop extending core actions in EntitySchema to [SW][ES-M5][TECH] Stop extending core actions in EntitySchema.Sep 26 2023, 2:01 PM
ItamarWMDE renamed this task from [SW][ES-M5][TECH] Stop extending core actions in EntitySchema to [SW] [ES-M5] [TECH] Stop extending core actions in EntitySchema.
ItamarWMDE renamed this task from [SW] [ES-M5] [TECH] Stop extending core actions in EntitySchema to [ES-M5] [TECH] Stop extending core actions in EntitySchema.Oct 25 2023, 9:21 AM

For my own reference - a question that comes up for me is whether to create an ActionFactory service and get the action instances from there, or whether it's okay to pass injected services in from another class whose dependencies have been injected.

Change #1100428 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/EntitySchema@master] Stop extending unstable ViewAction in EntitySchema

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

I reviewed the current version of the change, but as I won’t be able to review it again until Monday I’m leaving the task up for grabs.

Change #1100428 merged by jenkins-bot:

[mediawiki/extensions/EntitySchema@master] Stop extending unstable ViewAction in EntitySchema

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