Page MenuHomePhabricator

doMaintenance.php creates ConfigFactory::getDefaultInstance() before Setup.php is run
Closed, ResolvedPublic

Description

$maintenance->setConfig( ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) );
$maintenance->finalSetup();
// Some last includes
require_once "$IP/includes/Setup.php";

We now load extensions from the top of Setup.php, meaning that if they want to register their config types, it's too late. AFAICT we cannot move up Setup.php to before finalSetup() because it needs to run before extension functions. So I'm thinking we should just call Maintenance::setConfig() *after* Setup.php runs and say that finalSetup has to use globals for now.

Event Timeline

Legoktm created this task.Feb 25 2015, 5:12 AM
Legoktm updated the task description. (Show Details)
Legoktm raised the priority of this task from to Needs Triage.
Legoktm added subscribers: Legoktm, Mattflaschen-WMF.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 25 2015, 5:12 AM
Aklapper triaged this task as Low priority.Mar 3 2015, 3:42 PM

Change 194281 had a related patch set uploaded (by Legoktm):
maintenance: Defer initilization of 'main' Config until after Setup.php runs

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

Legoktm set Security to None.
Legoktm moved this task from Backlog to Needs Review/Feedback on the MediaWiki-Core-Team board.
Legoktm moved this task from Backlog to In Progress on the MediaWiki-Configuration board.
Legoktm claimed this task.Mar 5 2015, 10:10 PM

Change 194281 merged by Legoktm:
maintenance: Defer initilization of 'main' Config until after Setup.php runs

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

Legoktm closed this task as Resolved.Mar 6 2015, 3:18 AM
bd808 moved this task from Done to Archive on the MediaWiki-Core-Team board.Mar 9 2015, 9:14 PM