Page MenuHomePhabricator

Removing ApiErrorFormatter_BackCompat
Open, Needs TriagePublic

Description

It's unclear when we can remove ApiErrorFormatter_BackCompat... It's deprecated since 1.25

		$errorFormat = $request->getVal( 'errorformat', 'bc' );
		$errorLangCode = $request->getVal( 'errorlang', 'uselang' );
		$errorsUseDB = $request->getCheck( 'errorsuselocal' );
		if ( in_array( $errorFormat, [ 'plaintext', 'wikitext', 'html', 'raw', 'none' ], true ) ) {
			if ( $errorLangCode === 'uselang' ) {
				$errorLang = $this->getLanguage();
			} elseif ( $errorLangCode === 'content' ) {
				$errorLang = MediaWikiServices::getInstance()->getContentLanguage();
			} else {
				$errorLangCode = RequestContext::sanitizeLangCode( $errorLangCode );
				$errorLang = Language::factory( $errorLangCode );
			}
			$this->mErrorFormatter = new ApiErrorFormatter(
				$this->mResult, $errorLang, $errorFormat, $errorsUseDB
			);
		} else {
			$this->mErrorFormatter = new ApiErrorFormatter_BackCompat( $this->mResult );
		}

Is it a mixture of checking WMF usage, possibly some public deprecated warning (via the API), API announce and then get rid?

Event Timeline

Reedy created this task.Apr 14 2019, 12:25 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 14 2019, 12:25 AM
Anomie moved this task from Unsorted to Blocked on the MediaWiki-API board.Apr 15 2019, 7:40 PM
Anomie added a subscriber: Anomie.

The tricky part is that this is what every old client is using by default, so it would be a major change to get people to switch along the lines of the continuation change a few years ago. So for the moment I'm going to put this into "blocked" on someone actually doing that evangelization.