+ /**
+ * Get the list of abilities and their values
+ * @return bool[]
+ */
+ private function getAbilities() {
+ return [
+ 'shell' => !Shell::isDisabled(),
+ ];
+ }
+
+ /**
+ * Queries information about the software environment and constructs an appropiate version checker
+ *
+ * @return VersionChecker
+ */
+ private function buildVersionChecker() {
+ global $wgVersion;
+ // array to optionally specify more verbose error messages for
+ // missing abilities
+ $abilityErrors = [
+ 'shell' => ( new ShellDisabledError() )->getMessage(),
+ ];
+
+ return new VersionChecker(
+ $wgVersion,
+ PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION . '.' . PHP_RELEASE_VERSION,
+ get_loaded_extensions(),
+ $this->getAbilities(),
+ $abilityErrors
+ );
+ }
+