User:WolfgangFahl/Workdocumentation 2015-12-27

From semantic-mediawiki.org
Jump to: navigation, search
WolfgangFahlUser:WolfgangFahl/Workdocumentation 2015-12-27

see

Environment

Environment: MacOSX 10.11.2 El Capitan MacPorts MAMP see https://trac.macports.org/wiki/howto/MAMP

  • MacOSX: Darwin neso.bitplan.com 15.2.0 Darwin Kernel Version 15.2.0: Fri Nov 13 19:56:56 PST 2015; root:xnu-3248.20.55~2/RELEASE_X86_64 x86_64
  • Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.2e DAV/2 PHP/5.6.16
  • mysql Ver 14.14 Distrib 5.6.28, for osx10.11 (x86_64) using EditLine wrapper
  • PHP 5.6.16 (cli) (built: Dec 26 2015 14:55:14)

Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

   with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans

Installing xdebug

sudo port install php56-xdebug
sudo port unload apache2
sudo port load apache2

add to php.ini:

[xdebug]
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000

Installing Eclipse for PHP

Eclipse for PHP developers

Trying to Debug with Eclipse

Creating a Project

New Project "MediaWiki" from source Create debug configuration for "index.php" with Debugger "XDebug", Default Port 9000

Timeout issues

Message:
Page load failed with error: timeout ...

Trying to Debug PHP Unit Tests with Eclipse

Install Makegood http://marketplace.eclipse.org/content/makegood-1 from Eclipse Marketplace (search makegood)

MakeGood

<?php
class TestMakeGood extends PHPUnit_Framework_TestCase
{
    public function testPushAndPop()
    {
        $stack = array();
        $this->assertEquals(0, count($stack));

        array_push($stack, 'foo');
        $this->assertEquals('foo', $stack[count($stack)-1]);
        $this->assertEquals(1, count($stack));

        $this->assertEquals('foo', array_pop($stack));
        $this->assertEquals(0, count($stack));
    }
}
?>
vendor/phpunit/phpunit/phpunit  TestMakeGood.php 
PHPUnit 4.8.21 by Sebastian Bergmann and contributors.

.

Time: 89 ms, Memory: 4.25Mb

OK (1 test, 5 assertions)

Mediawiki phpunit with MakeGood

We need a valid entry point composer.json in SemanticMediaWiki defines a script

  "phpunit": "php ../../tests/phpunit/phpunit.php -c phpunit.xml.dist",

Meaning that the phpunit.php from Mediawiki's tests/phpunit/phpunit.php is called as an entry point.

MakeGood Trial
<?php
// This is a preload script to be used with
// the Eclipse makegood continuous integration plugin
// see https://github.com/piece/makegood/releases
// create a maintainance derived entry point
error_reporting(E_ALL);
if ( php_sapi_name() !== 'cli' ) {
	die( 'MakeGoodPreload can only be called from PHP CLI' );
}
global 
	$IP,
	$self,
	$wgCommandLineMode,
	$wgConfigRegistry,
	$wgContLang,
	$wgDBtype,
	$wgLocalisationCacheConf,
	$wgMainCacheType, 
	$wgMessageCacheType, 
	$wgParserCacheType,
	$wgObjectCaches,
	$wgVersion,
	$wgMWLoggerDefaultSpi;

$dir=dirname(dirname(dirname(dirname( __FILE__ ))));
putenv('MW_INSTALL_PATH='.$dir);
$IP=$dir;
// we can't use Maintenance.php as an entry point due to the way
// shouldExecute is implemented in doMaintenance.php
// we are forced to cut & paste programming here :-(
$self="MakeGoodPreload";
# Define us as being in MediaWiki
define( 'MEDIAWIKI', true );
$wgCommandLineMode = true;
# Start the autoloader, so that extensions can derive classes from core files
require_once "$IP/includes/AutoLoader.php";
# Grab profiling functions
require_once "$IP/includes/profiler/ProfilerFunctions.php";

# Start the profiler
$wgProfiler = array();
if ( file_exists( "$IP/StartProfiler.php" ) ) {
	require "$IP/StartProfiler.php";
}

// Some other requires
require_once "$IP/includes/Defines.php";
require_once "$IP/includes/DefaultSettings.php";
require_once "$IP/includes/GlobalFunctions.php";

# Load composer's autoloader if present
if ( is_readable( "$IP/vendor/autoload.php" ) ) {
	require_once "$IP/vendor/autoload.php";
}

if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
	# Use a callback function to configure MediaWiki
	call_user_func( MW_CONFIG_CALLBACK );
}

require_once "$IP/includes/Setup.php";
$config=ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
phpunit.php
#!/usr/bin/env php
<?php
/**
 * Bootstrapping for MediaWiki PHPUnit tests
 *
 * @file
 */

// Set a flag which can be used to detect when other scripts have been entered
// through this entry point or not.
define( 'MW_PHPUNIT_TEST', true );

// Start up MediaWiki in command-line mode
require_once dirname( dirname( __DIR__ ) ) . "/maintenance/Maintenance.php";

class PHPUnitMaintClass extends Maintenance {

	public static $additionalOptions = array(
		'regex' => false,
		'file' => false,
		'use-filebackend' => false,
		'use-bagostuff' => false,
		'use-jobqueue' => false,
		'keep-uploads' => false,
		'use-normal-tables' => false,
		'reuse-db' => false,
		'wiki' => false,
	);

	public function __construct() {
		parent::__construct();
		$this->addOption(
			'with-phpunitdir',
			'Directory to include PHPUnit from, for example when using a git '
				. 'fetchout from upstream. Path will be prepended to PHP `include_path`.',
			false, # not required
			true # need arg
		);
		$this->addOption(
			'debug-tests',
			'Log testing activity to the PHPUnitCommand log channel.',
			false, # not required
			false # no arg needed
		);
		$this->addOption( 'regex', 'Only run parser tests that match the given regex.', false, true );
		$this->addOption( 'file', 'File describing parser tests.', false, true );
		$this->addOption( 'use-filebackend', 'Use filebackend', false, true );
		$this->addOption( 'use-bagostuff', 'Use bagostuff', false, true );
		$this->addOption( 'use-jobqueue', 'Use jobqueue', false, true );
		$this->addOption( 'keep-uploads', 'Re-use the same upload directory for each test, don\'t delete it.', false, false );
		$this->addOption( 'use-normal-tables', 'Use normal DB tables.', false, false );
		$this->addOption( 'reuse-db', 'Init DB only if tables are missing and keep after finish.', false, false );
	}

	public function finalSetup() {
		parent::finalSetup();

		global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType;
		global $wgLanguageConverterCacheType, $wgUseDatabaseMessages;
		global $wgLocaltimezone, $wgLocalisationCacheConf;
		global $wgDevelopmentWarnings;

		// Inject test autoloader
		require_once __DIR__ . '/../TestsAutoLoader.php';

		// wfWarn should cause tests to fail
		$wgDevelopmentWarnings = true;

		$wgMainCacheType = CACHE_NONE;
		$wgMessageCacheType = CACHE_NONE;
		$wgParserCacheType = CACHE_NONE;
		$wgLanguageConverterCacheType = CACHE_NONE;

		$wgUseDatabaseMessages = false; # Set for future resets

		// Assume UTC for testing purposes
		$wgLocaltimezone = 'UTC';

		$wgLocalisationCacheConf['storeClass'] = 'LCStoreNull';

		// Bug 44192 Do not attempt to send a real e-mail
		Hooks::clear( 'AlternateUserMailer' );
		Hooks::register(
			'AlternateUserMailer',
			function () {
				return false;
			}
		);
		// xdebug's default of 100 is too low for MediaWiki
		ini_set( 'xdebug.max_nesting_level', 1000 );
	}

	public function execute() {
		global $IP;

		// Deregister handler from MWExceptionHandler::installHandle so that PHPUnit's own handler
		// stays in tact.
		// Has to in execute() instead of finalSetup(), because finalSetup() runs before
		// doMaintenance.php includes Setup.php, which calls MWExceptionHandler::installHandle().
		restore_error_handler();

		$this->forceFormatServerArgv();

		# Make sure we have --configuration or PHPUnit might complain
		if ( !in_array( '--configuration', $_SERVER['argv'] ) ) {
			//Hack to eliminate the need to use the Makefile (which sucks ATM)
			array_splice( $_SERVER['argv'], 1, 0,
				array( '--configuration', $IP . '/tests/phpunit/suite.xml' ) );
		}

		# --with-phpunitdir let us override the default PHPUnit version
		# Can use with either or phpunit.phar in the directory or the
		# full PHPUnit code base.
		if ( $this->hasOption( 'with-phpunitdir' ) ) {
			$phpunitDir = $this->getOption( 'with-phpunitdir' );

			# prepends provided PHPUnit directory or phar
			$this->output( "Will attempt loading PHPUnit from `$phpunitDir`\n" );
			set_include_path( $phpunitDir . PATH_SEPARATOR . get_include_path() );

			# Cleanup $args array so the option and its value do not
			# pollute PHPUnit
			$key = array_search( '--with-phpunitdir', $_SERVER['argv'] );
			unset( $_SERVER['argv'][$key] ); // the option
			unset( $_SERVER['argv'][$key + 1] ); // its value
			$_SERVER['argv'] = array_values( $_SERVER['argv'] );
		}

		if ( !wfIsWindows() ) {
			# If we are not running on windows then we can enable phpunit colors
			# Windows does not come anymore with ANSI.SYS loaded by default
			# PHPUnit uses the suite.xml parameters to enable/disable colors
			# which can be then forced to be enabled with --colors.
			# The below code injects a parameter just like if the user called
			# Probably fix bug 29226
			$key = array_search( '--colors', $_SERVER['argv'] );
			if ( $key === false ) {
				array_splice( $_SERVER['argv'], 1, 0, '--colors' );
			}
		}

		# Makes MediaWiki PHPUnit directory includable so the PHPUnit will
		# be able to resolve relative files inclusion such as suites/*
		# PHPUnit uses stream_resolve_include_path() internally
		# See bug 32022
		$key = array_search( '--include-path', $_SERVER['argv'] );
		if ( $key === false ) {
			array_splice( $_SERVER['argv'], 1, 0,
				__DIR__
				. PATH_SEPARATOR
				. get_include_path()
			);
			array_splice( $_SERVER['argv'], 1, 0, '--include-path' );
		}

		$key = array_search( '--debug-tests', $_SERVER['argv'] );
		if ( $key !== false && array_search( '--printer', $_SERVER['argv'] ) === false ) {
			unset( $_SERVER['argv'][$key] );
			array_splice( $_SERVER['argv'], 1, 0, 'MediaWikiPHPUnitTestListener' );
			array_splice( $_SERVER['argv'], 1, 0, '--printer' );
		}

		foreach ( self::$additionalOptions as $option => $default ) {
			$key = array_search( '--' . $option, $_SERVER['argv'] );
			if ( $key !== false ) {
				unset( $_SERVER['argv'][$key] );
				if ( $this->mParams[$option]['withArg'] ) {
					self::$additionalOptions[$option] = $_SERVER['argv'][$key + 1];
					unset( $_SERVER['argv'][$key + 1] );
				} else {
					self::$additionalOptions[$option] = true;
				}
			}
		}

	}

	public function getDbType() {
		return Maintenance::DB_ADMIN;
	}

	/**
	 * Force the format of elements in $_SERVER['argv']
	 *  - Split args such as "wiki=enwiki" into two separate arg elements "wiki" and "enwiki"
	 */
	private function forceFormatServerArgv() {
		$argv = array();
		foreach ( $_SERVER['argv'] as $key => $arg ) {
			if ( $key === 0 ) {
				$argv[0] = $arg;
			} elseif ( strstr( $arg, '=' ) ) {
				foreach ( explode( '=', $arg, 2 ) as $argPart ) {
					$argv[] = $argPart;
				}
			} else {
				$argv[] = $arg;
			}
		}
		$_SERVER['argv'] = $argv;
	}

}

$maintClass = 'PHPUnitMaintClass';
require RUN_MAINTENANCE_IF_MAIN;

// Prevent segfault when we have lots of unit tests (bug 62623)
if ( version_compare( PHP_VERSION, '5.4.0', '<' ) ) {
	register_shutdown_function( function () {
		gc_collect_cycles();
		gc_disable();
	} );
}


$ok = false;

foreach ( array(
	stream_resolve_include_path( 'phpunit.phar' ),
	'PHPUnit/Runner/Version.php',
	'PHPUnit/Autoload.php'
) as $includePath ) {
	@include_once $includePath;
	if ( class_exists( 'PHPUnit_TextUI_Command' ) ) {
		$ok = true;
		break;
	}
}

if ( !$ok ) {
	die( "Couldn't find a usable PHPUnit.\n" );
}

$puVersion = PHPUnit_Runner_Version::id();
if ( $puVersion !== '@package_version@' && version_compare( $puVersion, '3.7.0', '<' ) ) {
	die( "PHPUnit 3.7.0 or later required; you have {$puVersion}.\n" );
}

PHPUnit_TextUI_Command::main();
1) SMW\Tests\InTextAnnotationParserTest::testTextParse with data set #2 (0, array(array(true), false, true), 'Lorem ipsum dolor sit &$% con...Donec.', array('class="smw-highlighter" data-...nline"', false, 3, array('Foo', 'Bar', '_ERRC'), array('Tincidunt semper', '9001')))
ConfigException: GlobalVarConfig::get: undefined option: 'PasswordDefault'
some more globals
$this->mInterwikiMagic = $wgInterwikiMagic;
		$this->mAllowExternalImages = $wgAllowExternalImages;
		$this->mAllowExternalImagesFrom = $wgAllowExternalImagesFrom;
		$this->mEnableImageWhitelist = $wgEnableImageWhitelist;
		$this->mAllowSpecialInclusion = $wgAllowSpecialInclusion;
		$this->mMaxIncludeSize = $wgMaxArticleSize * 1024;
		$this->mMaxPPNodeCount = $wgMaxPPNodeCount;
		$this->mMaxGeneratedPPNodeCount = $wgMaxGeneratedPPNodeCount;
		$this->mMaxPPExpandDepth = $wgMaxPPExpandDepth;
		$this->mMaxTemplateDepth = $wgMaxTemplateDepth;
		$this->mExpensiveParserFunctionLimit = $wgExpensiveParserFunctionLimit;
		$this->mCleanSignatures = $wgCleanSignatures;
		$this->mExternalLinkTarget = $wgExternalLinkTarget;
		$this->mDisableContentConversion = $wgDisableLangConversion;
		$this->mDisableTitleConversion = $wgDisableLangConversion || $wgDisableTitleConversion;
get globals
#!/bin/bash
# get all Mediawiki global variables
# WF 2015-12-28

collect() {
for f in `find . -name '*.php'`
do
  grep global $f > /dev/null
  if [ $? -eq 0 ]
  then
    grep "global .wg" $f
    grep "global .smwg" $f
  fi
done
}

globals=/tmp/Mediawikiglobals.txt
if [ ! -f $globals ]
then
  collect > $globals
fi
  cat $globals | grep -v "*" | awk '
{ 
  gsub("global","");
  gsub("//.*","");
  gsub("#.*","");
  gsub(" ","");
  gsub(";","");
  gsub("\t","");
  n=split($0,vars,",");
  for (i = 0; ++i <= n;) {
    print vars[i];
  }
}
' | sort -u | awk '
BEGIN { delim="" }
{ print $0,delim; delim=","}
'
<?php
// This is a preload script to be used with
// the Eclipse makegood continuous integration plugin
// see https://github.com/piece/makegood/releases
// create a maintainance derived entry point
error_reporting(E_ALL);
if ( php_sapi_name() !== 'cli' ) {
	die( 'MakeGoodPreload can only be called from PHP CLI' );
}
global $IP,$GLOBALS,
$self,
$ceAllowConfirmedEmail ,
$cgScriptPath ,
$egPushBatchSize ,
$egPushBulkWorkers ,
$egPushIncFiles ,
$egPushIncTemplates ,
$egPushTargets ,
$egVariablesDisabledFunctions,
$messageMemc ,
$parserMemc ,
$smwgAllowRecursiveExport ,
$smwgBrowseShowAll ,
$smwgContLang,
$smwgEnabledResultFormatsWithRecursiveAnnotationSupport ,
$smwgExportAll ,
$smwgExportBacklinks ,
$smwgHistoricTypeNamespace ,
$smwgMaxPropertyValues ,
$smwgNamespace,
$smwgQEnabled ,
$smwgQFeatures ,
$smwgQMaxInlineLimit ,
$smwgTypePagingLimit ,
$wgAccountCreationThrottle ,
$wgAction ,
$wgActionPaths ,
$wgActions ,
$wgActiveUserDays ,
$wgAdaptiveMessageCache ,
$wgAddGroups ,
$wgAdditionalMailParams ,
$wgAdvancedSearchHighlighting ,
$wgAjaxEditStash ,
$wgAllDBsAreLocalhost ,
$wgAllUnicodeFixes ,
$wgAllowAsyncCopyUploads ,
$wgAllowCiteGroups ,
$wgAllowCopyUploads ,
$wgAllowDisplayTitle ,
$wgAllowExternalImages ,
$wgAllowHTMLEmail ,
$wgAllowImageMoving ,
$wgAllowImageTag ,
$wgAllowJavaUploads ,
$wgAllowMicrodataAttributes ,
$wgAllowRdfaAttributes ,
$wgAllowSchemaUpdates ,
$wgAllowSlowParserFunctions ,
$wgAllowTitlesInSVG ,
$wgAllowUserCss ,
$wgAllowUserJs ,
$wgAlwaysUseTidy ,
$wgAmericanDates ,
$wgAntivirus ,
$wgAntivirusRequired ,
$wgAntivirusSetup ,
$wgApplyIpBlocksToXff ,
$wgArticle ,
$wgArticleCountMethod ,
$wgArticlePath ,
$wgArticleRobotPolicies ,
$wgAttemptFailureEpoch ,
$wgAuth ,
$wgAutoblockExpiry ,
$wgAutoloadClasses ,
$wgAutoloadLocalClasses ,
$wgAutopromote ,
$wgAutopromoteOnce ,
$wgAutopromoteOnceLogInRC ,
$wgAvailableRights ,
$wgBarBarBar ,
$wgBlacklistSettings ,
$wgBlockAllowsUTEdit ,
$wgBlockCIDRLimit ,
$wgBlockDisablesLogin ,
$wgBrowserBlackList ,
$wgCacheDirectory ,
$wgCacheEpoch ,
$wgCachePages ,
$wgCachePrefix ,
$wgCanonicalNamespaceNames ,
$wgCanonicalServer ,
$wgCapitalLinkOverrides ,
$wgCapitalLinks ,
$wgCaptcha ,
$wgCaptchaBadLoginAttempts ,
$wgCaptchaBadLoginExpiration ,
$wgCaptchaClass ,
$wgCaptchaDeleteOnSolve ,
$wgCaptchaDirectory ,
$wgCaptchaDirectoryLevels ,
$wgCaptchaFileBackend ,
$wgCaptchaQuestions ,
$wgCaptchaRegexes ,
$wgCaptchaSecret ,
$wgCaptchaSessionExpiration ,
$wgCaptchaStorageClass ,
$wgCaptchaTriggers ,
$wgCaptchaTriggersOnNamespace ,
$wgCaptchaWhitelist ,
$wgCaptchaWhitelistIP ,
$wgCargo24HourTime ,
$wgCargoAllowedSQLFunctions ,
$wgCargoDBname ,
$wgCargoDBpassword ,
$wgCargoDBserver ,
$wgCargoDBtype ,
$wgCargoDBuser ,
$wgCargoDecimalMark ,
$wgCargoDefaultQueryLimit ,
$wgCargoDigitGroupingCharacter ,
$wgCargoDrilldownLargestFontSize ,
$wgCargoDrilldownMinValuesForComboBox ,
$wgCargoDrilldownNumRangesForNumbers ,
$wgCargoDrilldownSmallestFontSize ,
$wgCargoDrilldownUseTabs ,
$wgCargoFieldTypes ,
$wgCargoMapClusteringMinimum ,
$wgCargoMaxQueryLimit ,
$wgCargoRecurringEventMaxInstances ,
$wgCascadingRestrictionLevels ,
$wgCategoryCollation ,
$wgCheckFileExtensions ,
$wgCiteCacheReferences ,
$wgClockSkewFudge ,
$wgCommandLineDarkBg ,
$wgCommandLineMode ,
$wgCompressRevisions ,
$wgConf ,
$wgConfigRegistry ,
$wgContLang ,
$wgContLanguageCode ,
$wgContentHandlerTextFallback ,
$wgContentHandlerUseDB ,
$wgContentHandlers ,
$wgContentNamespaces ,
$wgCookieDomain ,
$wgCookieExpiration ,
$wgCookieHttpOnly ,
$wgCookiePath ,
$wgCookiePrefix ,
$wgCookieSecure ,
$wgCopyUploadAsyncTimeout ,
$wgCopyUploadProxy ,
$wgCopyUploadTimeout ,
$wgCopyUploadsDomains ,
$wgCopyrightIcon ,
$wgCustomConvertCommand ,
$wgDBOracleDRCP ,
$wgDBTableOptions ,
$wgDBWindowsAuthentication ,
$wgDBadminpassword ,
$wgDBadminuser ,
$wgDBcompress ,
$wgDBerrorLog ,
$wgDBerrorLogTZ ,
$wgDBmwschema ,
$wgDBmysql5 ,
$wgDBname ,
$wgDBpassword ,
$wgDBport ,
$wgDBprefix ,
$wgDBserver ,
$wgDBservers ,
$wgDBssl ,
$wgDBtype ,
$wgDBuser ,
$wgDebugComments ,
$wgDebugDBTransactions ,
$wgDebugDumpSql ,
$wgDebugDumpSqlLength ,
$wgDebugLogFile ,
$wgDebugLogGroups ,
$wgDebugLogPrefix ,
$wgDebugRawPage ,
$wgDebugTidy ,
$wgDebugTimestamps ,
$wgDebugToolbar ,
$wgDefaultExternalStore ,
$wgDefaultLanguageVariant ,
$wgDefaultRobotPolicy ,
$wgDefaultSkin ,
$wgDefaultUserOptions ,
$wgDeferredUpdateList ,
$wgDeleteRevisionsLimit ,
$wgDeprecationReleaseLimit ,
$wgDevelopmentWarnings ,
$wgDiff ,
$wgDiff3 ,
$wgDirectoryMode ,
$wgDisableAnonTalk ,
$wgDisableCookieCheck ,
$wgDisableInternalSearch ,
$wgDisableLangConversion ,
$wgDisableOutputCompression ,
$wgDisableQueryPageUpdate ,
$wgDisableSearchUpdate ,
$wgDisableTitleConversion ,
$wgDisableUploadScriptChecks ,
$wgDisabledVariants ,
$wgDjvuDump ,
$wgDjvuOutputExtension ,
$wgDjvuPostProcessor ,
$wgDjvuRenderer ,
$wgDjvuToXML ,
$wgDjvuTxt ,
$wgDnsBlacklistUrls ,
$wgDummyLanguageCodes ,
$wgEditEncoding ,
$wgEmailAuthentication ,
$wgEmailConfirmToEdit ,
$wgEnableAPI ,
$wgEnableAutoRotation ,
$wgEnableDnsBlacklist ,
$wgEnableEmail ,
$wgEnableJavaScriptTest ,
$wgEnableParserCache ,
$wgEnableParserLimitReporting ,
$wgEnableScaryTranscluding ,
$wgEnableSearchContributorsByIP ,
$wgEnableSidebarCache ,
$wgEnableUploads ,
$wgEnableUserEmail ,
$wgEnableWriteAPI ,
$wgEnotifFromEditor ,
$wgEnotifImpersonal ,
$wgEnotifMaxRecips ,
$wgEnotifMinorEdits ,
$wgEnotifRevealEditorAddress ,
$wgEnotifUseJobQ ,
$wgEnotifUseRealName ,
$wgEnotifUserTalk ,
$wgEnotifWatchlist ,
$wgExceptionHooks ,
$wgExemptFromUserRobotsControl ,
$wgExiv2Command ,
$wgExperimentalHtmlIds ,
$wgExtModifiedFields ,
$wgExtNewFields ,
$wgExtNewIndexes ,
$wgExtNewTables ,
$wgExtPGAlteredFields ,
$wgExtPGNewFields ,
$wgExtensionAssetsPath ,
$wgExtensionCredits ,
$wgExtensionDirectory ,
$wgExtensionEntryPointListFiles ,
$wgExtensionFunctions,
$wgExtensionInfoMTime ,
$wgExtensionMessagesFiles ,
$wgExternalDiffEngine ,
$wgExternalLinkTarget ,
$wgExternalServers ,
$wgExternalStores ,
$wgExtraGenderNamespaces ,
$wgExtraInterlanguageLinkPrefixes ,
$wgExtraLanguageNames ,
$wgExtraNamespaces ,
$wgFallbackSkin ,
$wgFavicon ,
$wgFeed ,
$wgFeedCacheTimeout ,
$wgFeedClasses ,
$wgFeedDiffCutoff ,
$wgFileBackends ,
$wgFileBlacklist ,
$wgFileCacheDepth ,
$wgFileCacheDirectory ,
$wgFileExtensions ,
$wgFilterLogTypes ,
$wgFixArabicUnicode ,
$wgFixMalayalamUnicode ,
$wgFooterIcons ,
$wgForceUIMsgAsContentMsg ,
$wgForeignFileRepos ,
$wgGadgetsCaching ,
$wgGeSHiSupportedLanguages ,
$wgGitBin ,
$wgGitRepositoryViewers ,
$wgGrammarForms ,
$wgGroupPermissions ,
$wgGroupsAddToSelf ,
$wgGroupsRemoveFromSelf ,
$wgHKDFAlgorithm ,
$wgHKDFSecret ,
$wgHTCPMulticastTTL ,
$wgHTCPRouting ,
$wgHTTPConnectTimeout ,
$wgHTTPProxy ,
$wgHTTPTimeout ,
$wgHeaderTabsAutomaticNamespaces ,
$wgHeaderTabsDefaultFirstTab ,
$wgHeaderTabsEditTabLink ,
$wgHeaderTabsRenderSingleTab ,
$wgHeaderTabsScriptPath ,
$wgHeaderTabsStyle ,
$wgHeaderTabsTabIndexes ,
$wgHeaderTabsUseHistory ,
$wgHiddenPrefs ,
$wgHideInterlanguageLinks ,
$wgHideUserContribLimit ,
$wgHooks ,
$wgHtml5Version ,
$wgIgnoreImageErrors ,
$wgIllegalFileChars ,
$wgImageLimits ,
$wgImageMagickConvertCommand ,
$wgImgAuthDetails ,
$wgImgAuthUrlPathMap ,
$wgImplicitGroups ,
$wgIncludeLegacyJavaScript ,
$wgInternalServer ,
$wgInterwikiCache ,
$wgInterwikiCentralDB ,
$wgInterwikiExpiry ,
$wgInterwikiFallbackSite ,
$wgInterwikiMagic ,
$wgInterwikiScopes ,
$wgInterwikiViewOnly ,
$wgInvalidRedirectTargets ,
$wgInvalidUsernameCharacters ,
$wgJobBackoffThrottling ,
$wgJobClasses ,
$wgJobQueueAggregator ,
$wgJobQueueMigrationConfig ,
$wgJobTypeConf ,
$wgJobTypesExcludedFromDefaultQueue ,
$wgJpegTran ,
$wgJsMimeType ,
$wgLBFactoryConf ,
$wgLang ,
$wgLangObjCacheSize ,
$wgLanguageCode ,
$wgLanguageConverterCacheType ,
$wgLegacyEncoding ,
$wgLegacySchemaConversion ,
$wgLegalTitleChars ,
$wgLinkHolderBatchSize ,
$wgLoadScript ,
$wgLocalDatabases ,
$wgLocalFileRepo ,
$wgLocalInterwikis ,
$wgLocalTZoffset ,
$wgLocalVirtualHosts ,
$wgLocalisationCacheConf ,
$wgLocalisationUpdateDirectory ,
$wgLocalisationUpdateRepositories ,
$wgLocalisationUpdateRepository ,
$wgLocaltimezone ,
$wgLockManagers ,
$wgLogActions ,
$wgLogActionsHandlers ,
$wgLogAutopatrol ,
$wgLogExceptionBacktrace ,
$wgLogHeaders ,
$wgLogNames ,
$wgLogRestrictions ,
$wgLogSpamBlacklistHits ,
$wgLogTypes ,
$wgLoginLanguageSelector ,
$wgLogo ,
$wgMSL_FileTypes ,
$wgMSU_autoIndex ,
$wgMSU_checkAutoCat ,
$wgMSU_confirmReplace ,
$wgMSU_imgParams ,
$wgMSU_showAutoCat ,
$wgMSU_useDragDrop ,
$wgMSU_useMsLinks ,
$wgMWLoggerDefaultSpi ,
$wgMainCacheType ,
$wgMangleFlashPolicy ,
$wgMaxAnimatedGifArea ,
$wgMaxArticleSize ,
$wgMaxImageArea ,
$wgMaxMsgCacheEntrySize ,
$wgMaxNameChars ,
$wgMaxRedirects ,
$wgMaxShellMemory ,
$wgMaxSigChars ,
$wgMaxSquidPurgeTitles ,
$wgMaxTocLevel ,
$wgMaxUploadSize ,
$wgMaximalPasswordLength ,
$wgMaximumMovedPages ,
$wgMediaHandlers ,
$wgMemCachedServers ,
$wgMemCachedTimeout ,
$wgMemc ,
$wgMemoryLimit ,
$wgMessageCacheType ,
$wgMessagesDirs ,
$wgMetaNamespace ,
$wgMetaNamespaceTalk ,
$wgMimeType ,
$wgMimeTypeBlacklist ,
$wgMinimalPasswordLength ,
$wgMiserMode ,
$wgMsgCacheExpiry ,
$wgNamespaceAliases ,
$wgNamespaceContentModels ,
$wgNamespaceProtection ,
$wgNamespaceRobotPolicies ,
$wgNamespacesToBeSearchedDefault ,
$wgNamespacesWithSubpages ,
$wgNewPasswordExpiry ,
$wgNewUserLog ,
$wgNoFollowDomainExceptions ,
$wgNoFollowLinks ,
$wgNoFollowNsExceptions ,
$wgNoReplyAddress ,
$wgNonincludableNamespaces ,
$wgObjectCacheSessionExpiry ,
$wgObjectCaches ,
$wgOpenSearchTemplate ,
$wgOut ,
$wgOverrideHostname ,
$wgPFEnableStringFunctions ,
$wgPFStringLengthLimit ,
$wgPageLanguageUseDB ,
$wgPagePropLinkInvalidations ,
$wgPagePropsHaveSortkey ,
$wgPageSchemasHandlerClasses ,
$wgParser ,
$wgParserCacheExpireTime ,
$wgParserCacheType ,
$wgParserConf ,
$wgParserTestFiles ,
$wgPasswordAttemptThrottle ,
$wgPasswordConfig,
$wgPasswordDefault,
$wgPasswordExpirationDays ,
$wgPasswordExpireGrace ,
$wgPasswordReminderResendTime ,
$wgPasswordResetRoutes ,
$wgPasswordSalt ,
$wgPasswordSender ,
$wgPdfBookTab ,
$wgPdfCreateThumbnailsInJobQueue ,
$wgPdfHandlerDpi ,
$wgPdfHandlerJpegQuality ,
$wgPdfInfo ,
$wgPdfOutputExtension ,
$wgPdfPostProcessor ,
$wgPdfProcessor ,
$wgPdftoText ,
$wgPhpCli ,
$wgPoolCounterConf ,
$wgPreloadJavaScriptMwUtil ,
$wgPreprocessorCacheThreshold ,
$wgPreviewOnOpenNamespaces ,
$wgProfileLimit ,
$wgProfilePerHost ,
$wgProfiler ,
$wgProxyList ,
$wgProxyWhitelist ,
$wgPutIPinRC ,
$wgQueryCacheLimit ,
$wgRCEngines ,
$wgRCFeeds ,
$wgRCMaxAge ,
$wgRateLimits ,
$wgRateLimitsExcludedIPs ,
$wgRawHtml ,
$wgReCaptchaPrivateKey ,
$wgReCaptchaPublicKey ,
$wgReCaptchaTheme ,
$wgReadOnly ,
$wgReadOnlyFile ,
$wgRecentChangesFlags ,
$wgRedirectOnLogin ,
$wgRedirectSources ,
$wgRegisterInternalExternals ,
$wgRemoveGroups ,
$wgRenderHashAppend ,
$wgRequest ,
$wgRequestTime ,
$wgReservedUsernames ,
$wgResourceBasePath ,
$wgResourceLoaderDebug ,
$wgResourceLoaderMinifierMaxLineLength ,
$wgResourceLoaderMinifierStatementsOnOwnLine ,
$wgResponsiveImages ,
$wgRestrictDisplayTitle ,
$wgRestrictionLevels ,
$wgRestrictionTypes ,
$wgRevisionCacheExpiry ,
$wgRevokePermissions ,
$wgRightsIcon ,
$wgRightsPage ,
$wgRightsText ,
$wgRightsUrl ,
$wgSMTP ,
$wgSQLMode ,
$wgSQLiteDataDir ,
$wgSVGConverter ,
$wgSVGConverterPath ,
$wgSVGConverters ,
$wgSVGMaxSize ,
$wgSVGMetadataCutoff ,
$wgScript ,
$wgScriptExtension ,
$wgScriptPath ,
$wgSearchHighlightBoundaries ,
$wgSearchType ,
$wgSearchTypeAlternatives ,
$wgSecretKey ,
$wgSecureLogin ,
$wgSemiprotectedRestrictionLevels ,
$wgSend404Code ,
$wgServer ,
$wgServerName ,
$wgSessionCacheType ,
$wgSessionsInMemcached ,
$wgSessionsInObjectCache ,
$wgSharedDB ,
$wgSharedPrefix ,
$wgSharedSchema ,
$wgSharedTables ,
$wgSharpenParameter ,
$wgSharpenReductionThreshold ,
$wgShellLocale ,
$wgShowArchiveThumbnails ,
$wgShowDBErrorBacktrace ,
$wgShowDebug ,
$wgShowEXIF ,
$wgShowExceptionDetails ,
$wgShowHostnames ,
$wgShowIPinHeader ,
$wgShowRollbackEditCount ,
$wgShowSQLErrors ,
$wgShowUpdatedMarker ,
$wgSidebarCacheExpiry ,
$wgSiteNotice ,
$wgSiteStatsAsyncFactor ,
$wgSiteTypes ,
$wgSitemapNamespaces ,
$wgSitemapNamespacesPriorities ,
$wgSitename ,
$wgSkipSkins ,
$wgSpamBlacklistFiles ,
$wgSpamBlacklistSettings ,
$wgSpamRegex ,
$wgSpecialPageCacheUpdates ,
$wgSpecialPageGroups ,
$wgSpecialPages ,
$wgSpecialVersionShowHooks ,
$wgSquidMaxage ,
$wgSquidPurgeUseHostHeader ,
$wgSquidServers ,
$wgSquidServersNoPurge ,
$wgStrictFileExtensions ,
$wgStyleDirectory ,
$wgStylePath ,
$wgStyleVersion ,
$wgSummarySpamRegex ,
$wgSyntaxHighlightDefaultLang ,
$wgSyntaxHighlightKeywordLinks ,
$wgSyntaxHighlightModels ,
$wgSysopEmailBans ,
$wgTextModelsToParse ,
$wgTexvc ,
$wgThumbLimits ,
$wgThumbUpright ,
$wgThumbnailBuckets ,
$wgThumbnailEpoch ,
$wgThumbnailMinimumBucketDistance ,
$wgTidyBin ,
$wgTidyConf ,
$wgTidyInternal ,
$wgTidyOpts ,
$wgTiffThumbnailType ,
$wgTitle ,
$wgTitleBlacklistCaching ,
$wgTitleBlacklistLogHits ,
$wgTitleBlacklistSources ,
$wgTitleBlacklistUsernameSources ,
$wgTmpDirectory ,
$wgTranscludeCacheExpiry ,
$wgTranslateNumerals ,
$wgTrivialMimeDetection ,
$wgTrustedMediaFormats ,
$wgUDPProfilerFormatString ,
$wgUDPProfilerHost ,
$wgUDPProfilerPort ,
$wgUFAllowedNamespaces ,
$wgUFEnablePersonalDataFunctions ,
$wgUFEnableSpecialContexts ,
$wgUpdateCompatibleMetadata ,
$wgUpdateRowsPerJob ,
$wgUpdateRowsPerQuery ,
$wgUploadDirectory ,
$wgUploadMaintenance ,
$wgUploadMissingFileUrl ,
$wgUploadNavigationUrl ,
$wgUploadPath ,
$wgUploadSizeWarning ,
$wgUploadStashMaxAge ,
$wgUploadThumbnailRenderHttpCustomDomain ,
$wgUploadThumbnailRenderHttpCustomHost ,
$wgUploadThumbnailRenderMap ,
$wgUploadThumbnailRenderMethod ,
$wgUrlProtocols ,
$wgUseAjax ,
$wgUseAutomaticEditSummaries ,
$wgUseCategoryBrowser ,
$wgUseCombinedLoginLink ,
$wgUseDatabaseMessages ,
$wgUseETag ,
$wgUseEnotif ,
$wgUseFileCache ,
$wgUseGzip ,
$wgUseImageMagick ,
$wgUseImageResize ,
$wgUseLocalMessageCache ,
$wgUseMediaWikiUIEverywhere ,
$wgUseNPPatrol ,
$wgUsePathInfo ,
$wgUsePrivateIPs ,
$wgUseRCPatrol ,
$wgUseSiteCss ,
$wgUseSquid ,
$wgUseTagFilter ,
$wgUseTidy ,
$wgUseXVO ,
$wgUser ,
$wgUserEmailConfirmationTokenExpiry ,
$wgUserrightsInterwikiDelimiter ,
$wgUsersNotifiedOnAllChanges ,
$wgValidateAllHtml ,
$wgVariantArticlePath ,
$wgVaryOnXFP ,
$wgVerifyMimeType ,
$wgVersion ,
$wgWellFormedXml ,
$wgWhitelistRead ,
$wgWhitelistReadRegexp ,
$wgWikiEditorFeatures ,
$wgWikimediaJenkinsCI ,
$wgXhtmlNamespaces ,
$wgsomething;
$dir=dirname(dirname(dirname(dirname( __FILE__ ))));
putenv('MW_INSTALL_PATH='.$dir);
$IP=$dir;
require_once('maintenance/commandLine.inc');