From e52347fc407bd3577f8093a81e8d713f768f4669 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Wed, 10 Oct 2018 15:04:51 -0700 Subject: [PATCH] Drop wfUsePHP, deprecated in 1.30 and unused Change-Id: Ic247af4e9b2b2e687ee74e990e69401426be7c31 --- RELEASE-NOTES-1.32 | 4 +++- includes/GlobalFunctions.php | 27 --------------------------- 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index ffe10f2b41..affa83db40 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -331,9 +331,11 @@ because of Phabricator reports. phase. * The global function wfErrorLog, deprecated since 1.25, has now been removed. Use MWLoggerLegacyLogger::emit or UDPTransport. - The hooks 'SpecialRecentChangesQuery' & 'SpecialWatchlistQuery', deprecated in +* The hooks 'SpecialRecentChangesQuery' & 'SpecialWatchlistQuery', deprecated in 1.23, were removed. Instead, use ChangesListSpecialPageStructuredFilters or ChangesListSpecialPageQuery. +* The global function wfUsePHP, deprecated since 1.30, has now been removed. To + assert a newer version of PHP than MediaWiki does, use extension registration. === Deprecations in 1.32 === * HTMLForm::setSubmitProgressive() is deprecated. No need to call it. Submit diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 868fda3c43..49a2612360 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2455,33 +2455,6 @@ function wfDiff( $before, $after, $params = '-u' ) { return $diff; } -/** - * This function works like "use VERSION" in Perl, the program will die with a - * backtrace if the current version of PHP is less than the version provided - * - * This is useful for extensions which due to their nature are not kept in sync - * with releases, and might depend on other versions of PHP than the main code - * - * Note: PHP might die due to parsing errors in some cases before it ever - * manages to call this function, such is life - * - * @see perldoc -f use - * - * @param string|int|float $req_ver The version to check, can be a string, an integer, or a float - * - * @deprecated since 1.30 - * - * @throws MWException - */ -function wfUsePHP( $req_ver ) { - wfDeprecated( __FUNCTION__, '1.30' ); - $php_ver = PHP_VERSION; - - if ( version_compare( $php_ver, (string)$req_ver, '<' ) ) { - throw new MWException( "PHP $req_ver required--this is only $php_ver" ); - } -} - /** * Return the final portion of a pathname. * Reimplemented because PHP5's "basename()" is buggy with multibyte text. -- 2.20.1