--- On Tue, 8/11/09, Brion Vibber <br...@wikimedia.org> wrote:

> I'm not sure there's a compelling reason to even have $IP
> set in 
> LocalSettings.php anymore; the base include path should
> probably be 
> autodetected in all cases, which is already being done in
> WebStart.php 
> and commandLine.inc, the web and CLI initialization
> includes based on 
> their locations in the file tree.

I started this thread because two of the fixes in the patch for bug ticket 
20112 (those for Database.t and Global.t) move the require of LocalSettings.php 
before the require of AutoLoader.php. This is necessary because AutoLoader.php 
eventually executes: 
require_once("$IP/js2/mwEmbed/php/jsAutoloadLocalClasses.php").

This is a perfect example of how file position dependent code can introduce 
bugs. If $IP computation is eliminated from LocalSettings.php, then both of 
these tests will once again fail. The tests in phase3/t/inc are not executed as 
the result of a web request or through a command line execution path that 
includes maintenance/Command.inc. They normally are executed by typing at a 
terminal: "prove t/inc -r" or, e.g., "prove t/inc/Global.t". "prove" is a TAP 
protocol consumer that digests and displays the results of the tests, which are 
TAP protocol producers.

So, eliminating $IP computation from LocalSettings would require the 
development of new code for these tests. That would mean there would be 4 
places where $IP is computed: WebStart.php, Command.inc, /config/index.php and 
the t test place. Not good.


      

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to