MediaWiki REL1_34
|
Provides functions to check a set of extensions with dependencies against a set of loaded extensions and given version information. 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. | |
Private Member Functions | |
handleDependency ( $version, $constraint, $checkedExt) | |
Handle a simple dependency to MediaWiki core or PHP. | |
handleExtensionDependency ( $dependencyName, $constraint, $checkedExt, $type) | |
Handle a dependency to another extension. | |
setCoreVersion ( $coreVersion) | |
Set MediaWiki core version. | |
setPhpVersion ( $phpVersion) | |
Set PHP version. | |
Private Attributes | |
bool[] | $abilities = [] |
List of provided abilities. | |
string[] | $abilityErrors = [] |
List of provided ability errors. | |
Constraint bool | $coreVersion = false |
representing $wgVersion | |
array | $loaded = [] |
Loaded extensions. | |
string[] | $phpExtensions = [] |
List of installed PHP extensions. | |
Constraint bool | $phpVersion = false |
representing PHP version | |
VersionParser | $versionParser |
Provides functions to check a set of extensions with dependencies against a set of loaded extensions and given version information.
Definition at line 32 of file VersionChecker.php.
VersionChecker::__construct | ( | $coreVersion, | |
$phpVersion, | |||
array | $phpExtensions, | ||
array | $abilities = [] , |
||
array | $abilityErrors = [] |
||
) |
string | $coreVersion | Current version of core |
string | $phpVersion | Current PHP version |
string[] | $phpExtensions | List of installed PHP extensions |
bool[] | $abilities | List of provided abilities |
string[] | $abilityErrors | Error messages for the abilities |
Definition at line 75 of file VersionChecker.php.
References $abilities, $abilityErrors, $phpExtensions, setCoreVersion(), and setPhpVersion().
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' } } }
array | $extDependencies | All extensions that depend on other ones |
Definition at line 156 of file VersionChecker.php.
References handleDependency(), and handleExtensionDependency().
|
private |
Handle a simple dependency to MediaWiki core or PHP.
See handleMediaWikiDependency and handlePhpDependency for details.
Constraint | bool | $version | The version installed |
string | $constraint | The required version constraint for this dependency |
string | $checkedExt | The Extension, which depends on this dependency |
Definition at line 282 of file VersionChecker.php.
Referenced by checkArray().
|
private |
Handle a dependency to another extension.
string | $dependencyName | The name of the dependency |
string | $constraint | The required version constraint for this dependency |
string | $checkedExt | The Extension, which depends on this dependency |
string | $type | Either 'extensions' or 'skins' |
Definition at line 306 of file VersionChecker.php.
Referenced by checkArray().
|
private |
Set MediaWiki core version.
string | $coreVersion | Current version of core |
Definition at line 104 of file VersionChecker.php.
References $coreVersion.
Referenced by __construct().
VersionChecker::setLoadedExtensionsAndSkins | ( | array | $credits | ) |
Set an array with credits of all loaded extensions and skins.
array | $credits | An array of installed extensions with credits of them |
Definition at line 93 of file VersionChecker.php.
|
private |
Set PHP version.
string | $phpVersion | Current PHP version. Must be well-formed. |
UnexpectedValueException |
Definition at line 122 of file VersionChecker.php.
References $phpVersion.
Referenced by __construct().
|
private |
List of provided abilities.
Definition at line 51 of file VersionChecker.php.
Referenced by __construct().
|
private |
List of provided ability errors.
Definition at line 56 of file VersionChecker.php.
Referenced by __construct().
|
private |
representing $wgVersion
Definition at line 36 of file VersionChecker.php.
Referenced by setCoreVersion().
|
private |
Loaded extensions.
Definition at line 61 of file VersionChecker.php.
|
private |
List of installed PHP extensions.
Definition at line 46 of file VersionChecker.php.
Referenced by __construct().
|
private |
representing PHP version
Definition at line 41 of file VersionChecker.php.
Referenced by setPhpVersion().
|
private |
Definition at line 66 of file VersionChecker.php.