Force type Language for $lang of DifferenceEngine::setTextLanguage
authorFomafix <fomafix@googlemail.com>
Tue, 19 Jun 2018 19:48:40 +0000 (21:48 +0200)
committerFomafix <fomafix@googlemail.com>
Wed, 17 Oct 2018 04:17:28 +0000 (06:17 +0200)
Change-Id: I77e7116f81072fa42f580552e7b94323cfe31856

RELEASE-NOTES-1.33
includes/diff/DifferenceEngine.php

index 37f282d..7580d30 100644 (file)
@@ -47,6 +47,8 @@ because of Phabricator reports.
 * …
 
 === Breaking changes in 1.33 ===
+* The parameteter $lang in DifferenceEngine::setTextLanguage must be of type
+  Language. Other types are deprecated since 1.32.
 * …
 
 === Deprecations in 1.33 ===
index f8f3d1c..8d0971e 100644 (file)
@@ -1665,11 +1665,8 @@ class DifferenceEngine extends ContextSource {
         * @param Language $lang
         * @since 1.19
         */
-       public function setTextLanguage( $lang ) {
-               if ( !$lang instanceof Language ) {
-                       wfDeprecated( __METHOD__ . ' with other type than Language for $lang', '1.32' );
-               }
-               $this->mDiffLang = wfGetLangObj( $lang );
+       public function setTextLanguage( Language $lang ) {
+               $this->mDiffLang = $lang;
        }
 
        /**