MediaWiki master
MediaWiki\Registration\VersionChecker Class Reference

Check whether extensions and their dependencies meet certain version requirements. More...

Public Member Functions

 __construct ( $coreVersion, $phpVersion, array $phpExtensions, array $abilities=[], array $abilityErrors=[])
 
 checkArray (array $extDependencies)
 Check all given dependencies if they are compatible with the named installed extensions in the $credits array.
 
 setLoadedExtensionsAndSkins (array $credits)
 Set an array with credits of all loaded extensions and skins.
 

Detailed Description

Check whether extensions and their dependencies meet certain version requirements.

Since
1.29
Author
Legoktm
Florian Schmidt

Definition at line 35 of file VersionChecker.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Registration\VersionChecker::__construct ( $coreVersion,
$phpVersion,
array $phpExtensions,
array $abilities = [],
array $abilityErrors = [] )
Parameters
string$coreVersionCurrent version of core
string$phpVersionCurrent PHP version
string[]$phpExtensionsList of installed PHP extensions
bool[]$abilitiesList of provided abilities
string[]$abilityErrorsError messages for the abilities

Definition at line 78 of file VersionChecker.php.

Member Function Documentation

◆ checkArray()

MediaWiki\Registration\VersionChecker::checkArray ( array $extDependencies)

Check all given dependencies if they are compatible with the named installed extensions in the $credits array.

Example $extDependencies: { 'FooBar' => { 'MediaWiki' => '>= 1.25.0', 'platform': { 'php': '>= 7.0.0', 'ext-foo': '*', 'ability-bar': true }, 'extensions' => { 'FooBaz' => '>= 1.25.0' }, 'skins' => { 'BazBar' => '>= 1.0.0' } } }

Parameters
array$extDependenciesAll extensions that depend on other ones
Returns
array[] List of errors

Definition at line 160 of file VersionChecker.php.

References MediaWiki\Registration\ExtensionRegistry\MEDIAWIKI_CORE.

◆ setLoadedExtensionsAndSkins()

MediaWiki\Registration\VersionChecker::setLoadedExtensionsAndSkins ( array $credits)

Set an array with credits of all loaded extensions and skins.

Parameters
array$creditsAn array of installed extensions with credits of them
Returns
VersionChecker $this

Definition at line 97 of file VersionChecker.php.


The documentation for this class was generated from the following file: