/** * Display an error for the vendor/autoload.php file not being found. * * @param string $type See wfGenericError * @param string $mwVersion See wfGenericError */ function wfMissingVendorError($type, $mwVersion) { $shortText = "Installing some external dependencies (e.g. via composer) is required."; $longText = "Error: You are missing some external dependencies. \n" . "MediaWiki now also has some external dependencies that need to be installed\n" . "via composer or from a separate git repo. Please see\n" . "https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries\n" . "for help on installing the required components."; // @codingStandardsIgnoreStart Generic.Files.LineLength $longHtml = <<<HTML \t\tMediaWiki now also has some external dependencies that need to be installed via \t\tcomposer or from a separate git repo. Please see \t\t<a href="https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries">mediawiki.org</a> \t\tfor help on installing the required components. HTML; // @codingStandardsIgnoreEnd wfGenericError($type, $mwVersion, 'External dependencies', $shortText, $longText, $longHtml); }
/** * Display an error for a PHP extension not existing. * * @param string $type See wfGenericError * @param string $mwVersion See wfGenericError * @param array $missingExts The extensions we're missing */ function wfMissingExtensions($type, $mwVersion, $missingExts) { $shortText = "Installing some PHP extensions is required."; $missingExtText = ''; $missingExtHtml = ''; $baseUrl = 'https://secure.php.net'; foreach ($missingExts as $ext) { $missingExtText .= " * {$ext} <{$baseUrl}/{$ext}>\n"; $missingExtHtml .= "<li><b>{$ext}</b> " . "(<a href=\"{$baseUrl}/{$ext}\">more information</a>)</li>"; } $cliText = "Error: Missing one or more required components of PHP.\n" . "You are missing a required extension to PHP that MediaWiki needs.\n" . "Please install:\n" . $missingExtText; $longHtml = <<<HTML \t\tYou are missing a required extension to PHP that MediaWiki \t\trequires to run. Please install: \t\t<ul> \t\t{$missingExtHtml} \t\t</ul> HTML; wfGenericError($type, $mwVersion, 'Required components', $shortText, $cliText, $longHtml); }