Also make the parameter $tooltip mandatory to ensure that a mandatory
parameter does follow an optional parameter. ParserOutput always fill
all parameters of doEditSectionLink.
The call of wfGetLangObj( $lang ) is not necessary anymore.
This change is a follow-up to Id49201957e716ef8a2ea930b3616ca4fe6e35633.
Change-Id: Ic49d76c7d9357f99b462471696f7e1eb86e70e3d
=== Breaking changes in 1.33 ===
* The parameteter $lang in DifferenceEngine::setTextLanguage must be of type
Language. Other types are deprecated since 1.32.
=== Breaking changes in 1.33 ===
* The parameteter $lang in DifferenceEngine::setTextLanguage must be of type
Language. Other types are deprecated since 1.32.
+* Skin::doEditSectionLink requires type Language for the parameter $lang.
+ The parameters $tooltip and $lang are mandatory. Omitting the parameters is
+ deprecated since 1.32.
* …
=== Deprecations in 1.33 ===
* …
=== Deprecations in 1.33 ===
* @param string $section The designation of the section being pointed to,
* to be included in the link, like "§ion=$section"
* @param string|null $tooltip The tooltip to use for the link: will be escaped
* @param string $section The designation of the section being pointed to,
* to be included in the link, like "§ion=$section"
* @param string|null $tooltip The tooltip to use for the link: will be escaped
- * and wrapped in the 'editsectionhint' message.
- * Not setting this parameter is deprecated.
- * @param Language|string $lang Language object or language code string.
- * Type string is deprecated. Not setting this parameter is deprecated.
+ * and wrapped in the 'editsectionhint' message
+ * @param Language $lang Language object
* @return string HTML to use for edit link
*/
* @return string HTML to use for edit link
*/
- public function doEditSectionLink( Title $nt, $section, $tooltip = null, $lang = false ) {
+ public function doEditSectionLink( Title $nt, $section, $tooltip, Language $lang ) {
// HTML generated here should probably have userlangattributes
// added to it for LTR text on RTL pages
// HTML generated here should probably have userlangattributes
// added to it for LTR text on RTL pages
- if ( !$lang instanceof Language ) {
- wfDeprecated( __METHOD__ . ' with other type than Language for $lang', '1.32' );
- $lang = wfGetLangObj( $lang );
- }
-
$attribs = [];
if ( !is_null( $tooltip ) ) {
$attribs['title'] = $this->msg( 'editsectionhint' )->rawParams( $tooltip )
$attribs = [];
if ( !is_null( $tooltip ) ) {
$attribs['title'] = $this->msg( 'editsectionhint' )->rawParams( $tooltip )