Page MenuHomePhabricator

Flow should use dependency injection instead of wfWikiID()
Open, Needs TriagePublic

Description

While testing an upgrade on my dev server, I began getting a bunch of errors from Flow like the following:

/wiki/Talk:Main_Page Flow\Exception\UnknownWorkflowIdException from line 127 of .../extensions/Flow/includes/WorkflowLoaderFactory.php: The requested workflow does not exist on this wiki.

This came from a mis-match between the results of wfWikiID() and what was stored in the database.

If we replace the calls to the global wfWikiID() with a wiki_id from Flow's dependency injection, it is easy to work-around this problem for testing scenarios like mine.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 16 2020, 11:10 PM

Change 589444 had a related patch set uploaded (by markahershberger; owner: markahershberger):
[mediawiki/extensions/Flow@master] Introduce dependency injection to replace calls to wfWikiID()

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

Restricted Application added a project: Growth-Team. · View Herald TranscriptApr 16 2020, 11:14 PM

Adding @daniel since I hear he knows a thing or two about DI.