GlobalFunctions: Remove deprecated wfCountDown() function from core
authorDerick Alangi <alangiderick@gmail.com>
Thu, 20 Jun 2019 21:49:04 +0000 (22:49 +0100)
committerDerick Alangi <alangiderick@gmail.com>
Thu, 20 Jun 2019 21:54:14 +0000 (22:54 +0100)
The global function `wfCountDown()` was deprecated in 1.31 and a replacement
made available (\Maintenance::countdown()) in 1.31 as well. Currently, the few
usage in BSF have been cleaned up, hence can be removed.

Usage
=====

https://codesearch.wmflabs.org/search/?q=wfCountDown&i=nope&files=&repos=

Depends-On: Iae61d36899036ecdc0341feb3f1bcaa6b38dbf44
Depends-On: Id202148c6a6ceaadcefcf7a4ab8360edd9fe3b0b
Bug: T220656
Change-Id: Ic7460f1d35cb6f2eb8bf60694cdd4c55b2e001c0

RELEASE-NOTES-1.34
includes/GlobalFunctions.php

index ae5a33a..67aa371 100644 (file)
@@ -222,6 +222,8 @@ because of Phabricator reports.
 * Parser::fetchFile(), deprecated in 1.32, has been removed. Use the method
   Parser::fetchFileAndTitle() instead.
 * The global function wfBCP47, deprecated in 1.31, has been removed.
+* wfCountDown() function, deprecated in 1.31, has been removed. Use
+  \Maintenance::countDown() method instead.
 * …
 
 === Deprecations in 1.34 ===
index 5e2efbf..c3829be 100644 (file)
@@ -2762,30 +2762,6 @@ function wfWaitForSlaves(
        return $lbFactory->waitForReplication( $opts );
 }
 
-/**
- * Count down from $seconds to zero on the terminal, with a one-second pause
- * between showing each number. For use in command-line scripts.
- *
- * @deprecated since 1.31, use Maintenance::countDown()
- *
- * @codeCoverageIgnore
- * @param int $seconds
- */
-function wfCountDown( $seconds ) {
-       wfDeprecated( __FUNCTION__, '1.31' );
-       for ( $i = $seconds; $i >= 0; $i-- ) {
-               if ( $i != $seconds ) {
-                       echo str_repeat( "\x08", strlen( $i + 1 ) );
-               }
-               echo $i;
-               flush();
-               if ( $i ) {
-                       sleep( 1 );
-               }
-       }
-       echo "\n";
-}
-
 /**
  * Replace all invalid characters with '-'.
  * Additional characters can be defined in $wgIllegalFileChars (see T22489).