Setup: Merge PreConfigSetup into Setup.php
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 19 Sep 2017 19:24:19 +0000 (20:24 +0100)
committerKrinkle <krinklemail@gmail.com>
Tue, 24 Oct 2017 23:50:54 +0000 (23:50 +0000)
commit8b7bafec2185b66bed68b2e7a211fa6c66ae4288
tree9a99a83b245942926b49557c0b1e2ff95c337016
parenta5b81128e895a9a2236655d5228c9c7ddc4c35e9
Setup: Merge PreConfigSetup into Setup.php

Follows-up 41ea7e2fefff65.

The following previously happened between PreConfigSetup and Setup
and must now happen either before it, after it, or moved inside it.

* WebStart: Detect missing composer.
  This must be after Autoloader/Vendor but before the first call to
  wfDebugLog (or other loggers) so that we can output a more descriptive
  error instead of a generic "Unknown class" fatal error.
  Moving it to before Setup is too early, and after is too late.
  Move it to within Setup.php and make it work in CLI mode.

* WebStart: Install header callback
  Moving it to before Setup is too early, and after is too late.
  Move it to within Setup.php (no-op in CLI mode).

* WebStart/Maintenance: Load LocalSetings.
  Must be between PreConfigSetup and Setup.
  Move to Setup.php to maintain execution order.
  Utilise MW_CONFIG_File for custom handling in Maintenance.php.

* WebStart: Initialise output buffering
  Utilise (new) MW_SETUP_CALLBACK hook.

* WebStart: Display NoLocalSettings.php
  Utilise MW_CONFIG_CALLBACK hook.

* Maintenance: Setting $wgLocalisationCacheConf, calling Maintenance::finalSetup.
  Utilise (new) MW_SETUP_CALLBACK hook.

Change-Id: I633a6ff235b4275391c48034c0525d2fbfa3fecd
includes/NoLocalSettings.php
includes/PreConfigSetup.php [deleted file]
includes/Setup.php
includes/WebStart.php
maintenance/doMaintenance.php