r102636 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102635‎ | r102636 | r102637 >
Date:11:18, 10 November 2011
Author:hashar
Status:reverted (Comments)
Tags:
Comment:
load up includes/Setup.php before Maintenance::finalSetup()

This let us get access to global functions and the autoloader when trying
to do some final setup for our maintenance scripts.
Modified paths:
  • /trunk/phase3/maintenance/doMaintenance.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/doMaintenance.php
@@ -93,10 +93,11 @@
9494 {
9595 require( MWInit::interpretedPath( 'AdminSettings.php' ) );
9696 }
97 -$maintenance->finalSetup();
9897 // Some last includes
9998 require_once( MWInit::compiledPath( 'includes/Setup.php' ) );
10099
 100+$maintenance->finalSetup();
 101+
101102 // Much much faster startup than creating a title object
102103 $wgTitle = null;
103104

Follow-up revisions

RevisionCommit summaryAuthorDate
r104145revert r102636...hashar09:41, 24 November 2011

Comments

#Comment by Platonides (talk | contribs)   22:15, 15 November 2011

This makes databaseless tests fail due to a missing database.

#Comment by Platonides (talk | contribs)   22:20, 15 November 2011

Basically, the disabling of caches to CACHE_NONE, gets done too late if moved after Setup.php as Setup.php calls wfGetMainCache(); & friends.

#Comment by Bawolff (talk | contribs)   01:40, 17 November 2011

This makes database tests (make safe) fail for me (Databaseless still work fine for me)

php phpunit.php --configuration /var/www/w/phase3/tests/phpunit/suite.xml  --exclude-group Broken,Destructive,Stub
PHPUnit 3.5.14 by Sebastian Bergmann.

A database error has occurred.  Did you forget to run maintenance/update.php after upgrading?  See: [http://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script http://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script]
Query: DELETE FROM `unittest_objectcache` WHERE keyname = 'wikidb-unittest_:user:id:1'
Function: SqlBagOStuff::delete
Error: 1146 Table 'wikidb.unittest_objectcache' doesn't exist (localhost)

Status & tagging log