From: James D. Forrester Date: Fri, 25 May 2018 00:01:02 +0000 (-0700) Subject: Follow-up If8dfdaf1: Hard-deprecate, drop two uses, other pre-5.3 back-compat code X-Git-Tag: 1.34.0-rc.0~5303 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=70c711a6bcf57cecea71bed19759848c0e147eb3;p=lhc%2Fweb%2Fwiklou.git Follow-up If8dfdaf1: Hard-deprecate, drop two uses, other pre-5.3 back-compat code Change-Id: I1c5eee3fe30d6687d88e07011a3d40b6770d0daf --- diff --git a/includes/collation/IcuCollation.php b/includes/collation/IcuCollation.php index f38396d7d0..d6ab0ff201 100644 --- a/includes/collation/IcuCollation.php +++ b/includes/collation/IcuCollation.php @@ -535,6 +535,7 @@ class IcuCollation extends Collation { * @return string */ static function getICUVersion() { + wfDeprecated( __METHOD__, '1.32' ); return INTL_ICU_VERSION; } diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 48728a3c1b..d4e5151264 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -233,9 +233,7 @@ class SpecialVersion extends SpecialPage { } $software[$dbr->getSoftwareLink()] = $dbr->getServerInfo(); - if ( IcuCollation::getICUVersion() ) { - $software['[http://site.icu-project.org/ ICU]'] = IcuCollation::getICUVersion(); - } + $software['[http://site.icu-project.org/ ICU]'] = INTL_ICU_VERSION; // Allow a hook to add/remove items. Hooks::run( 'SoftwareInfo', [ &$software ] ); diff --git a/maintenance/language/generateCollationData.php b/maintenance/language/generateCollationData.php index aec9252987..d30a077855 100644 --- a/maintenance/language/generateCollationData.php +++ b/maintenance/language/generateCollationData.php @@ -71,7 +71,7 @@ class GenerateCollationData extends Maintenance { $ucdallURL = "https://www.unicode.org/Public//ucdxml/ucd.all.grouped.zip"; if ( !$allkeysPresent || !$ucdallPresent ) { - $icuVersion = IcuCollation::getICUVersion(); + $icuVersion = INTL_ICU_VERSION; $unicodeVersion = IcuCollation::getUnicodeVersionForICU(); $error = ""; @@ -88,16 +88,7 @@ class GenerateCollationData extends Maintenance { } $versionKnown = false; - if ( !$icuVersion ) { - // Unknown version - either very old intl, - // or PHP < 5.3.7 which does not expose this information - $error .= "As MediaWiki could not determine the version of ICU library used by your PHP's " - . "intl extension it can't suggest which file version to download. " - . "This can be caused by running a very old version of intl or PHP < 5.3.7. " - . "If you are sure everything is all right, find out the ICU version " - . "by running phpinfo(), check what is the Unicode version it is using " - . "at http://site.icu-project.org/download, then try finding appropriate data file(s) at:"; - } elseif ( version_compare( $icuVersion, "4.0", "<" ) ) { + if ( version_compare( $icuVersion, "4.0", "<" ) ) { // Extra old version $error .= "You are using outdated version of ICU ($icuVersion), intended for " . ( $unicodeVersion ? "Unicode $unicodeVersion" : "an unknown version of Unicode" )