* (T222637) Passing ResourceLoaderModule objects to ResourceLoader::register()
or $wgResourceModules is no longer supported.
Use the 'class' or 'factory' option of the array format instead.
+* The parameter $lang of the functions generateTOC and tocList in Linker and
+ DummyLinker must be in type Language when present. Other types are
+ deprecated since 1.33.
* …
=== Deprecations in 1.34 ===
return Linker::tocLineEnd();
}
- public function tocList( $toc, $lang = null ) {
+ public function tocList( $toc, Language $lang = null ) {
return Linker::tocList( $toc, $lang );
}
- public function generateTOC( $tree, $lang = null ) {
+ public function generateTOC( $tree, Language $lang = null ) {
return Linker::generateTOC( $tree, $lang );
}
*
* @since 1.16.3
* @param string $toc Html of the Table Of Contents
- * @param string|Language|bool|null $lang Language for the toc title, defaults to user language.
- * The types string and bool are deprecated.
+ * @param Language|null $lang Language for the toc title, defaults to user language
* @return string Full html of the TOC
*/
- public static function tocList( $toc, $lang = null ) {
+ public static function tocList( $toc, Language $lang = null ) {
$lang = $lang ?? RequestContext::getMain()->getLanguage();
- if ( !$lang instanceof Language ) {
- wfDeprecated( __METHOD__ . ' with type other than Language for $lang', '1.33' );
- $lang = wfGetLangObj( $lang );
- }
$title = wfMessage( 'toc' )->inLanguage( $lang )->escaped();
*
* @since 1.16.3. $lang added in 1.17
* @param array $tree Return value of ParserOutput::getSections()
- * @param string|Language|bool|null $lang Language for the toc title, defaults to user language.
- * The types string and bool are deprecated.
+ * @param Language|null $lang Language for the toc title, defaults to user language
* @return string HTML fragment
*/
- public static function generateTOC( $tree, $lang = null ) {
+ public static function generateTOC( $tree, Language $lang = null ) {
$toc = '';
$lastLevel = 0;
foreach ( $tree as $section ) {