Remove language as string for DateFormatter::getInstance
authorFomafix <fomafix@googlemail.com>
Wed, 13 Sep 2017 13:47:01 +0000 (15:47 +0200)
committerKrinkle <krinklemail@gmail.com>
Thu, 19 Apr 2018 18:09:16 +0000 (18:09 +0000)
Change-Id: I677ab561d67b63f0c86f65fadf9319e41444a22a

RELEASE-NOTES-1.32
includes/parser/DateFormatter.php

index 7971bcc..c9ebbfb 100644 (file)
@@ -50,6 +50,8 @@ changes to languages because of Phabricator reports.
   Use Skin::msg() instead.
 * wfInitShellLocale() was removed (deprecated in 1.30).
 * wfShellExecDisabled() was removed (deprecated in 1.30).
+* The type string for the parameter $lang of DateFormatter::getInstance is
+  removed (deprecated in 1.31).
 
 === Deprecations in 1.32 ===
 * Use of a StartProfiler.php file is deprecated in favour of placing
index 0a4a60e..2aefc03 100644 (file)
@@ -130,13 +130,10 @@ class DateFormatter {
         *     Defaults to the site content language
         * @return DateFormatter
         */
-       public static function getInstance( $lang = null ) {
+       public static function getInstance( Language $lang = null ) {
                global $wgContLang, $wgMainCacheType;
 
-               if ( is_string( $lang ) ) {
-                       wfDeprecated( __METHOD__ . ' with type string for $lang', '1.31' );
-               }
-               $lang = $lang ? wfGetLangObj( $lang ) : $wgContLang;
+               $lang = $lang ?: $wgContLang;
                $cache = ObjectCache::getLocalServerInstance( $wgMainCacheType );
 
                static $dateFormatter = false;