Avoid references to DefaultSettings.
This replaces references to DefaultSettings with references to config-schema.yaml where appropriate. NOTE: this does not yet change Setup.php. DefaultSettings.php remains intact and is still being used. NOTE: this does not remove usages in the installer, see I5d8843a1062fbf for that. Bug: T300129 Change-Id: Ie6152cf510c3be61bc22167ca6d90dfc28910a45
This commit is contained in:
parent
85e2a07fe6
commit
a5277ce87f
11 changed files with 22 additions and 24 deletions
|
|
@ -172,8 +172,7 @@ define( 'SFH_OBJECT_ARGS', 2 );
|
|||
/** @} */
|
||||
|
||||
/** @{
|
||||
* Autopromote conditions (must be here, so that they're loaded for
|
||||
* DefaultSettings.php before AutoLoader.php)
|
||||
* Autopromote conditions
|
||||
*/
|
||||
define( 'APCOND_EDITCOUNT', 1 );
|
||||
define( 'APCOND_AGE', 2 );
|
||||
|
|
|
|||
|
|
@ -778,7 +778,7 @@ function wfUrlProtocolsWithoutProtRel() {
|
|||
* - fragment: the part after #, can be missing.
|
||||
*/
|
||||
function wfParseUrl( $url ) {
|
||||
global $wgUrlProtocols; // Allow all protocols defined in DefaultSettings/LocalSettings.php
|
||||
global $wgUrlProtocols; // Allow all protocols defined by the UrlProtocols setting.
|
||||
|
||||
// Protocol-relative URLs are handled really badly by parse_url(). It's so
|
||||
// bad that the easiest way to handle them is to just prepend 'http:' and
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ use ExtensionRegistry;
|
|||
use HashConfig;
|
||||
use JsonSchema\Constraints\Constraint;
|
||||
use JsonSchema\Validator;
|
||||
use MediaWiki\Config\IterableConfig;
|
||||
use MediaWiki\Settings\Cache\CacheableSource;
|
||||
use MediaWiki\Settings\Cache\CachedSource;
|
||||
use MediaWiki\Settings\Config\ConfigBuilder;
|
||||
|
|
@ -202,9 +203,9 @@ class SettingsBuilder {
|
|||
*
|
||||
* @note This will implicitly call apply()
|
||||
*
|
||||
* @return Config
|
||||
* @return IterableConfig
|
||||
*/
|
||||
public function getDefaultConfig(): Config {
|
||||
public function getDefaultConfig(): IterableConfig {
|
||||
$this->apply();
|
||||
return new HashConfig( $this->configSchema->getDefaults() );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -241,8 +241,8 @@ class LocalisationCache {
|
|||
];
|
||||
|
||||
/**
|
||||
* For constructor parameters, see the documentation in DefaultSettings.php
|
||||
* for $wgLocalisationCacheConf.
|
||||
* For constructor parameters, see the documentation for the LocalisationCacheConf
|
||||
* setting in docs/Configuration.md.
|
||||
*
|
||||
* Do not construct this directly. Use MediaWikiServices.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -41,8 +41,7 @@ use WikiMap;
|
|||
* - `$wgDBerrorLog`
|
||||
* - `$wgDBerrorLogTZ`
|
||||
*
|
||||
* See documentation in DefaultSettings.php for detailed explanations of each
|
||||
* variable.
|
||||
* See docs/Configuration.ms for detailed explanations of these settings.
|
||||
*
|
||||
* @see \MediaWiki\Logger\LoggerFactory
|
||||
* @since 1.25
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ abstract class Installer {
|
|||
/**
|
||||
* MediaWiki configuration globals that will eventually be passed through
|
||||
* to LocalSettings.php. The names only are given here, the defaults
|
||||
* typically come from DefaultSettings.php.
|
||||
* typically come from config-schema.yaml.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
|
|
@ -400,7 +400,7 @@ abstract class Installer {
|
|||
* Constructor, always call this from child classes.
|
||||
*/
|
||||
public function __construct() {
|
||||
$defaultConfig = new GlobalVarConfig(); // all the stuff from DefaultSettings.php
|
||||
$defaultConfig = new GlobalVarConfig(); // all the defaults from config-schema.yaml.
|
||||
$installerConfig = self::getInstallerConfig( $defaultConfig );
|
||||
|
||||
$this->resetMediaWikiServices( $installerConfig );
|
||||
|
|
@ -1429,9 +1429,9 @@ abstract class Installer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a default value to be used for $wgDefaultSkin: normally the one set in DefaultSettings,
|
||||
* but will fall back to another if the default skin is missing and some other one is present
|
||||
* instead.
|
||||
* Returns a default value to be used for $wgDefaultSkin: normally the DefaultSkin from
|
||||
* config-schema.yaml, but will fall back to another if the default skin is missing
|
||||
* and some other one is present instead.
|
||||
*
|
||||
* @param string[] $skinNames Names of installed skins.
|
||||
* @return string
|
||||
|
|
@ -1511,7 +1511,7 @@ abstract class Installer {
|
|||
$IP = $this->getVar( 'IP' );
|
||||
|
||||
/**
|
||||
* We need to include DefaultSettings before including extensions to avoid
|
||||
* We need to define the $wgXyz variables before including extensions to avoid
|
||||
* warnings about unset variables. However, the only thing we really
|
||||
* want here is $wgHooks['LoadExtensionSchemaUpdates']. This won't work
|
||||
* if the extension has hidden hook registration in $wgExtensionFunctions,
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ class LocalSettingsGenerator {
|
|||
# installer. If you make manual changes, please keep track in case you
|
||||
# need to recreate them later.
|
||||
#
|
||||
# See includes/DefaultSettings.php for all configurable settings
|
||||
# See docs/Configuration.md for all configurable settings
|
||||
# and their default values, but don't forget to make changes in _this_
|
||||
# file, not there.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ class ClassicInterwikiLookup implements InterwikiLookup {
|
|||
/**
|
||||
* Fetch interwiki prefix data from local cache in constant database.
|
||||
*
|
||||
* @note More logic is explained in DefaultSettings.
|
||||
* @note More logic is explained in docs/Configuration.md.
|
||||
*
|
||||
* @param string $prefix Interwiki prefix
|
||||
* @return Interwiki|false
|
||||
|
|
@ -218,7 +218,7 @@ class ClassicInterwikiLookup implements InterwikiLookup {
|
|||
/**
|
||||
* Get entry from pregenerated data
|
||||
*
|
||||
* @note More logic is explained in DefaultSettings.
|
||||
* @note More logic is explained in docs/Configuration.md.
|
||||
*
|
||||
* @param string $prefix Database key
|
||||
* @return bool|string The interwiki entry or false if not found
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ class ObjectCache {
|
|||
}
|
||||
|
||||
/**
|
||||
* Factory function for CACHE_ANYTHING (referenced from DefaultSettings.php)
|
||||
* Factory function for CACHE_ANYTHING (referenced by configuration)
|
||||
*
|
||||
* CACHE_ANYTHING means that stuff has to be cached, not caching is not an option.
|
||||
* If a caching method is configured for any of the main caches ($wgMainCacheType,
|
||||
|
|
@ -236,7 +236,7 @@ class ObjectCache {
|
|||
}
|
||||
|
||||
/**
|
||||
* Factory function for CACHE_ACCEL (referenced from DefaultSettings.php)
|
||||
* Factory function for CACHE_ACCEL (referenced from configuration)
|
||||
*
|
||||
* This will look for any APC or APCu style server-local cache.
|
||||
* A fallback cache can be specified if none is found.
|
||||
|
|
|
|||
|
|
@ -753,8 +753,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see $wgRCLinkDays in DefaultSettings.php.
|
||||
* @see $wgRCFilterByAge in DefaultSettings.php.
|
||||
* @see docs/Configuration.md for information on the RCLinkDays and RCFilterByAge settings.
|
||||
* @return int[]
|
||||
*/
|
||||
protected function getLinkDays() {
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ interface ImportSourcesHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param array &$importSources The value of $wgImportSources. Modify as necessary. See the
|
||||
* comment in DefaultSettings.php for the detail of how to structure this array.
|
||||
* @param array &$importSources The value of $wgImportSources. Modify as necessary. See
|
||||
* docs/Configuration.md for details about the structure of the ImportSources setting.
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
public function onImportSources( &$importSources );
|
||||
|
|
|
|||
Loading…
Reference in a new issue