User:Giuseppe Lavagetto/Mediawiki-config include chain
Appearance
In production, this is the chain of includes for MediaWiki:
# Inside the /w/index.php file in mediawiki-config
require 'multiversion/MWMultiVersion.php';
# Inside MWMultiVersion.php
require 'multiversion/defines.php';
require 'multiversion/MWRealm.php';
require MWMultiVersion::getMediaWiki( 'index.php' ); # this requires index.php from core in the correct version, which in turn will include LocalSettings.php eventually
# Inside php.../LocalSettings.php
require "/srv/mediawiki/wmf-config/CommonSettings.php";
# Inside CommonSettings.php
require 'wmf-config/wgConf.php';
# In the scope of a function in CommonSettings.php
require 'wmf-config/InitialiseSettings.php'
So basically anything you declare in CommonSettings.php is in file scope as far as I understand, which means it's referenceable everywhere, potentially.