Help:Development tool/Eclipse

From semantic-mediawiki.org
Development toolHelp:Development tool/Eclipse

What Links Here[edit]

Seeing is believing[edit]

The following video shows where you get after going thru this documentation:

Example Environment (s)[edit]

This description has been tried out on two environments a) MAMP b) LAMP

MAMP environment[edit]

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)

LAMP environment[edit]

  • Linux: Description: Ubuntu 14.04.3 LTS/Release: 14.04/ Codename: trusty
  • Apache/2.4.7 (Ubuntu)
  • mysql Ver 14.14 Distrib 5.5.46, for debian-linux-gnu (x86_64) using readline 6.3
  • PHP 5.5.9-1ubuntu4.14 (cli) (built: Oct 28 2015 01:34:46)

SMW Installation[edit]

The SMW installation has been done using composer.

Installing XDebug[edit]

add to php.ini:

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

Mac OS with Macports[edit]

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

Linux (e.g. Ubuntu)[edit]

apt-get install php5-xdebug
service apache2 restart

Installing Eclipse for PHP[edit]

Download and unpack Eclipse for PHP developers.

As of 2015-12 the latest Release is Version: Mars.1 Release 4.5.1 Build id: 20150924-1200

Linux[edit]

see http://ubuntuhandbook.org/index.php/2014/06/install-latest-eclipse-ubuntu-14-04/

Welcome Screen[edit]

If you see the following welcome screen then you successfully installed Eclipse for PHP Developers: Clipboard20151229094343.png

Creating the Mediawiki project[edit]

Select File/New/PHP Project from the menu. Select "Create project at existing location (from existing source) and Browse to your mediawiki folder. Then click "Finish". Clipboard20151229102537.png

Using the PHP Explorer[edit]

The PHP Explorer works in the usual Explorer style that presents a tree structure of the folders and files in the mediawiki main folder. Let's e.g. look at tests/phpunit/phpunit.php: Clipboard20151229103518.png

This is the "entry point" for PHPUnit Testcase in Mediawiki. This entry point is also used by the SMW PHPUnit Testcases.

Running some code[edit]

open "index.php" from the main mediawiki folder. Right click "Run as/PHP Web Application" A browser window should open next to the source code window and your wiki should be available for use in this browser window. Clipboard20151229182123.png

Debugging[edit]

Configuring the debugger[edit]

On the server side xdebug needs to be installed and configured. You might want to check it using a phpinfo() page. The xdebug section should look like this: Clipboard20151229184210.png

On the client / eclipse side you might want to configure the debug settings for your project. Right click on the project/Properties.

  • Enable project specific settings (or click Configure Workspace Settings if you'd like to make global changes)

Clipboard20151229183002.png

  • Click on "PHP Servers"
  • Select the Default PHP Web Server and click "Edit"

Clipboard20151229183132.png

  • Select the "Debugger" Tab
  • Select the XDebug Debugger and click "Finish"

Clipboard20151229183347.png

Testing to debug[edit]

  • open "index.php" in one tab and includes/specialpage/SpecialPage in another tab
  • set a breakpoint in the function "getTitleFor" at the return statement (as of 2015-12-29 this is line 78)
  • click on index.php and right click debug as "PHP Web Application"
  • there will be dialog to confirm the perspective switch to debug for the first time - acknowledge it

Clipboard20151229183402.png

  • the debugger will start and stop at the first active line of index.php
  • You can now step thru your code with commands like Run Step Into (F5) and Run Step Over (F6)
  • if you click the green "run" button the session will run until it hits the breakpoint
  • Here you can now inspect the variables e.g. in this case "$name" is "Hochladen" which is the german Special Page "Upload"

Clipboard20151229184229.png

  • If you click the run button a few more times the names of other special pages will show and you can see where "you are" in the stacktrace displayed

Testing[edit]

There are few thousand PHPUnit Tests which are checking that the SMW implementation conforms to it's expected behavior. If all is well theses tests should succeed in your development environment.

Running tests from commandline[edit]

The commands below show the result with a single error. All is well if there is no significant error left. There are a few testcases that are marked as "skip" or "risky". You might want to ignore these.

cd extensions/SemanticMediaWiki
php ../../composer.phar phpunit
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
> php ../../tests/phpunit/phpunit.php -c phpunit.xml.dist

Semantic MediaWiki: 2.4-alpha (SMWSQLStore3, mysql)
MediaWiki:          1.25.3 (MediaWiki vendor autoloader)

Execution date:     2015-12-30 12:50

PHPUnit 4.8.21 by Sebastian Bergmann and contributors.

Runtime:	PHP 5.6.16 with Xdebug 2.3.3
Configuration:	/opt/local/apache2/htdocs/mediawiki-1.25.3/extensions/SemanticMediaWiki/phpunit.xml.dist

.............................................................   61 / 3227 (  1%)
.............................................................  122 / 3227 (  3%)
.............................................................  183 / 3227 (  5%)
..............................
............................................................. 2623 / 3227 ( 81%)
............................................................. 2684 / 3227 ( 83%)
............................................................. 2745 / 3227 ( 85%)
......................................................S...... 2806 / 3227 ( 86%)
............................................SSSSSSS.......... 2867 / 3227 ( 88%)
...................................E
SMW\Tests\Integration\MediaWiki\Import\Maintenance\RebuildDataMaintenanceTest testRebuildData ran for 98.817 seconds
......................... 2928 / 3227 ( 90%)
............................................................. 2989 / 3227 ( 92%)
............................................................. 3050 / 3227 ( 94%)
............................................................. 3111 / 3227 ( 96%)
...................................SSS....................... 3172 / 3227 ( 98%)
.......................................................

Time: 9.53 minutes, Memory: 240.50Mb

There was 1 error:

1) SMW\Tests\Integration\MediaWiki\Import\Maintenance\RebuildDataMaintenanceTest::testRebuildData
DBQueryError: A database error has occurred. Did you forget to run maintenance/update.php after upgrading? 

FAILURES!
Tests: 3227, Assertions: 9603, Errors: 1, Failures: 1, Skipped: 11, Risky: 2.
Script php ../../tests/phpunit/phpunit.php -c phpunit.xml.dist handling the phpunit event returned with an error


                      
  [RuntimeException]  
  Error Output:       
                      


phpunit [--dev] [--no-dev] [--] [<args>]...

Running tests from eclipse[edit]

Its convenient to use the MakeGood Plugin for running tests in eclipse

MakeGood plugin installation[edit]

Some Links for MakeGood[edit]

Installing MakeGood from the Marketplace[edit]

Go to "Help/Eclipse Marketplace" Enter "MakeGood" in the search dialog and click "Go" Clipboard20151230140420.png

  • Then click "Install", "Confirm" and accept the license terms and "Finish".
  • Trust KUBO Atushiro;;Piece Project's certificate
  • Restart your Eclipse

Setting up an example[edit]

Basically follow the instructions of http://stackoverflow.com/a/34483373/1497139

  • Create a project "MakeGoodTest"

cd to it on the command line

install a local composer.phar[edit]

wf@capri:~/workspace/MakeGoodTest$ curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...

Composer successfully installed to: /hd/menki/home/wf/workspace/MakeGoodTest/composer.phar
Use it: php composer.phar

Install a local PHPUnit[edit]

Install a local composer based PHPUnit

wf@capri:~/workspace/MakeGoodTest$ sudo php composer.phar require "phpunit/phpunit=4.8.*"
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing sebastian/version (1.0.6)
    Downloading: 100%         

  - Installing sebastian/global-state (1.1.1)
    Downloading: 100%         

  - Installing sebastian/recursion-context (1.0.2)
    Downloading: 100%         

  - Installing sebastian/exporter (1.2.1)
    Downloading: 100%         

  - Installing sebastian/environment (1.3.3)
    Downloading: 100%         

  - Installing sebastian/diff (1.4.1)
    Downloading: 100%         

  - Installing sebastian/comparator (1.2.0)
    Downloading: 100%         

  - Installing symfony/yaml (v3.0.1)
    Downloading: 100%         

  - Installing doctrine/instantiator (1.0.5)
    Downloading: 100%         

  - Installing phpdocumentor/reflection-docblock (2.0.4)
    Downloading: 100%         

  - Installing phpspec/prophecy (v1.5.0)
    Downloading: 100%         

  - Installing phpunit/php-text-template (1.2.1)
    Downloading: 100%         

  - Installing phpunit/phpunit-mock-objects (2.3.8)
    Downloading: 100%         

  - Installing phpunit/php-timer (1.0.7)
    Downloading: 100%         

  - Installing phpunit/php-token-stream (1.4.8)
    Downloading: 100%         

  - Installing phpunit/php-file-iterator (1.4.1)
    Downloading: 100%         

  - Installing phpunit/php-code-coverage (2.2.4)
    Downloading: 100%         

  - Installing phpunit/phpunit (4.8.21)
    Downloading: 100%         

sebastian/global-state suggests installing ext-uopz (*)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Writing lock file
Generating autoload files

Create an example Testcase[edit]

Create test/MakeGoodTest.php with the following content:

<?php
class MakeGoodTest 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));
    }
}
?>

This file is based on an Example by Sebastian Bergmann.

Test PHPUnit command line[edit]

wf@capri:~/workspace/MakeGoodTest$ vendor/phpunit/phpunit/phpunit test/MakeGoodTest.php 
PHPUnit 4.8.21 by Sebastian Bergmann and contributors.

.

Time: 260 ms, Memory: 4.25Mb

OK (1 test, 5 assertions)

Configuring MakeGood for the MakeGoodTest example project[edit]

Right-Click / Refresh your MakeGoodTest project in Eclipse so that the command-line changes get visible.

Create the phpunit.xml file[edit]

This file is in the same directory as the composer.* files.

<phpunit backupGlobals="true"
         backupStaticAttributes="false"
         cacheTokens="false"
         colors="false"
         convertErrorsToExceptions="true"
         convertNoticesToExceptions="true"
         convertWarningsToExceptions="true"
         forceCoversAnnotation="false"
         mapTestClassNameToCoveredClassName="false"
         printerClass="PHPUnit_TextUI_ResultPrinter"
         processIsolation="false"
         stopOnError="false"
         stopOnFailure="false"
         stopOnIncomplete="false"
         stopOnSkipped="false"
         testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader"
         strict="false"
         verbose="false">
</phpunit>

Create the MakeGoodPreload.php file[edit]

<?php
// This is a preload script to be used with
// the Eclipse makegood continuous integration plugin
// see https://github.com/piece/makegood/releases
error_reporting(E_ALL);
$loader = require 'vendor/autoload.php';

Configure MakeGood for the MakeGoodTest Project[edit]

  • Right Click / Properties on the MakeGoodTest Project
  • Select MakeGood
  1. Add "test" as a test folder
  2. Browse "MakeGoodPreload.php" as the Preload Script

Clipboard20151230142850.png

  1. in the PHPUnit tab browse to the "phpunit.xml" accordingly

Trying out running tests with MakeGood[edit]

  • Open "MakeGoodTest.php"
  • Right click - there should be
  1. "Run Tests In"
  2. "Run Tests Related to This File"
  3. "Run All Tests"

available as options. Try e.g.

  • "Run All Tests"
  • "Run All Tests in Class"

The result should be

PHPUnit 4.8.21 by Sebastian Bergmann and contributors.
Warning:	Deprecated configuration setting "strict" used

.

MakeGood
 [x][32mPush and pop�[39m

Time: 209 ms, Memory: 8.75Mb

OK (1 test, 5 assertions)

As of 2015-12-30 the right click option does not work in Linux. I have filed a bug report at https://github.com/piece/makegood/issues/88 for this. Please comment on the bug report and here what your experience with Linux is.

Configuring MakeGood for SMW[edit]

Right click / Properties on your Mediawiki/SMW project select "MakeGood"

  • add mediawiki/extensions/SemanticMediaWiki/tests as your Test Folder

SMW already has a mediawiki/extensions/SemanticMediaWiki/phpunit.xml.dist file to be used - select this We need a MakeGoodPreload.php for this environment (which needs globals.inc).

MakeGoodPreload.php[edit]

<?php
// This is a preload script to be used with
// the Eclipse makegood continuous integration plugin
// see https://github.com/piece/makegood/releases
// the idea is to create a maintainance derived entry point
// comparable to what tests/phpunit.php in the mediawiki
// source code does
// unfortunately there are these lines in doMaintenance.php:
//  // Wasn't included from the file scope, halt execution (probably wanted the class)
//  // If a class is using commandLine.inc (old school maintenance), they definitely
//  // cannot be included and will proceed with execution
//  if ( !Maintenance::shouldExecute() && $maintClass != 'CommandLineInc' ) {
//	return;
// }
// which prevent us from creating a Maintenance derived class (or we would have to name it CommandLineInc ...)
// for the time being we'll try to stick with commandLine.inc itself to get an entry point
error_reporting(E_ALL);
if ( php_sapi_name() !== 'cli' ) {
	die( 'MakeGoodPreload can only be called from PHP CLI' );
}
// 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 );
include dirname( __FILE__ ) . '/globals.inc';
$dir=dirname(dirname(dirname(dirname( __FILE__ ))));
putenv('MW_INSTALL_PATH='.$dir);
$IP=$dir;
require_once('maintenance/commandLine.inc');
error_reporting(E_ALL);

globals.inc[edit]

<?php
// This is a list of globals used in Mediawiki
// which is used as a workaround as of 2015-12-29 to get MakeGoodPreload.php
// behave correctly.
// see "get globals" in https://www.semantic-mediawiki.org/wiki/User:WolfgangFahl/Workdocumentation_2015-12-27#tab=globals
// for a script that generated most of the globals below
// some globals where added manually later when debugging and finding out that these were missing
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 ,
$wgAllowExternalImagesFrom,
$wgAllowHTMLEmail ,
$wgAllowImageMoving ,
$wgAllowImageTag ,
$wgAllowJavaUploads ,
$wgAllowMicrodataAttributes ,
$wgAllowRdfaAttributes ,
$wgAllowSchemaUpdates ,
$wgAllowSlowParserFunctions ,
$wgAllowSpecialInclusion,
$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 ,
$wgCleanSignatures,
$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 ,
$wgEnableImageWhitelist,
$wgEnableJavaScriptTest ,
$wgEnableParserCache ,
$wgEnableParserLimitReporting ,
$wgEnableScaryTranscluding ,
$wgEnableSearchContributorsByIP ,
$wgEnableSidebarCache ,
$wgEnableUploads ,
$wgEnableUserEmail ,
$wgEnableWriteAPI ,
$wgEnotifFromEditor ,
$wgEnotifImpersonal ,
$wgEnotifMaxRecips ,
$wgEnotifMinorEdits ,
$wgEnotifRevealEditorAddress ,
$wgEnotifUseJobQ ,
$wgEnotifUseRealName ,
$wgEnotifUserTalk ,
$wgEnotifWatchlist ,
$wgExceptionHooks ,
$wgExemptFromUserRobotsControl ,
$wgExiv2Command ,
$wgExperimentalHtmlIds ,
$wgExpensiveParserFunctionLimit,
$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 ,
$wgMaxGeneratedPPNodeCount,
$wgMaxImageArea ,
$wgMaxMsgCacheEntrySize ,
$wgMaxNameChars ,
$wgMaxPPExpandDepth,
$wgMaxPPNodeCount,
$wgMaxRedirects ,
$wgMaxShellMemory ,
$wgMaxSigChars ,
$wgMaxSquidPurgeTitles ,
$wgMaxTemplateDepth,
$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;

about globals.inc[edit]

Using the above globals.inc is a "hacky" approach as of 2015-12-30. It would be nice to have a better approach than trying to list all possible globals. See https://www.semantic-mediawiki.org/wiki/User:WolfgangFahl/Workdocumentation_2015-12-27#tab=globals how this file was initially created. With this file most of the tests work - unfortunately not all yet.

Running Tests for SMW[edit]