On Tue, Jun 25, 2019 at 8:21 PM Kunal Mehta legoktm@member.fsf.org wrote:
I see 3 main ways to move forward:
- Move vendor/autoload.php earlier in Setup.php, potentially breaking
extensions that still rely on composer autoloading for initialization. 2. Set $wgServer = false or something in DefaultSettings.php, and then fill it in later in Setup.php *after* the composer autoloader has been loaded, potentially breaking anyone relying on the value of $wgServer in LocalSettings.php. 3. (status quo) not librarize code that runs before composer autoloader initialization. :(
There may be more entanglements here than I'm seeing, but I think that there may be an option 4: add code in WebRequest to replace the use of IP::splitHostAndPort() and IP::combineHostAndPort().
IP::combineHostAndPort() is trivial, and I think that splitHostAndPort() could be replaced with a semi-clever call to parse_url() that looked something like:
$parts = parse_url( 'fake://' . $_SERVER[$varName] );
Bryan