Page MenuHomePhabricator

Replace use of wfBCP47 (deprecated since MediaWiki 1.31)
Closed, ResolvedPublic


./includes/BabelLanguageCodes.php: return wfBCP47( $code );

It should use LanguageCode::bcp47() directly.

Check list

  • Check Support of MediaWiki 1.30 in extension.json
  • Remove Entire function bcp47 from BabelLanguageCodes.php, and use LanguageCode::bcp47( $code ) instead of self::bcp47( $code )

Related Objects

Event Timeline

Aklapper created this task.Dec 3 2018, 10:41 AM

@Aklapper Do you reserve this bug for any GCI student or can somebody else (me?) work on it?

@MarcoAurelio: No GCI tag on this, feel free to go ahead. Will we get a new good first task task filed from you in return? :P

@MarcoAurelio: No GCI tag on this, feel free to go ahead. Will we get a new good first task task filed from you in return? :P

Thank you. I'll give this one a try. Similarly, I'll try to add a new good first task task if I spot one in the future.

Restricted Application added a project: User-MarcoAurelio. · View Herald TranscriptDec 3 2018, 5:55 PM

So I'm wondering whether we should remove:

	 * Get the normalised IETF language tag.
	 * @param string $code The language code.
	 * @deprecated This provides backward compatibility; replace with
	 *   \LanguageCode::bcp47() once MW 1.30 is no longer supported.
	public static function bcp47( $code ) {
		if ( !is_callable( [ 'LanguageCode', 'bcp47' ] ) ) {
			return wfBCP47( $code );
		return LanguageCode::bcp47( $code );

altogether or just the if ( ... from that function.

@MarcoAurelio Sir, I think we can't remove it right now. As per the function definition, It should support MW 1.30 and Currently Its master branch support MW 1.30. and also LanguageCode::bcp47() has added in MediaWiki 1.31

@Jayprakash12345 If this can't be done right now, then maybe we shall set this task as 'stalled' until we can do it. What do you think?

Jayprakash12345 changed the task status from Open to Stalled.Dec 4 2018, 2:51 AM
MarcoAurelio removed MarcoAurelio as the assignee of this task.Dec 4 2018, 10:34 AM
MarcoAurelio removed a project: User-MarcoAurelio.

Removing myself as assignee just in case I forget about this, when the removal can take place.

Nikerabbit closed this task as Resolved.Dec 25 2019, 8:53 AM
Nikerabbit claimed this task.
Peachey88 reassigned this task from Nikerabbit to Ladsgroup.Dec 25 2019, 9:39 AM
Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptDec 25 2019, 9:39 AM