From: C. Scott Ananian Date: Fri, 13 Jul 2018 20:59:57 +0000 (-0400) Subject: Hard deprecate support for Parsoid v1 API X-Git-Tag: 1.34.0-rc.0~4775 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=11b90976ca6a4aa0eac36fab24501e264ada8728;p=lhc%2Fweb%2Fwiklou.git Hard deprecate support for Parsoid v1 API This was soft deprecated by f5c874cbaf2c1408342305fbc87dc6db36728e07 in May 2015, and support for the v1 API was removed from Parsoid in May 2016, but the compatibility code has persisted zombie-like in core. Hard deprecate this now, to warn anyone who might still be using ancient copies of Visual Editor and Parsoid, and then we can slice the code out in the next MW release. Bug: T100681 Change-Id: I68e0ab5b38f31b7708ba6f075dcb3328dde118d1 --- diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index 7ee3a678dd..f8abf603ea 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -253,6 +253,9 @@ because of Phabricator reports. classes are now deprecated. Use a Closure instead. * (T194263) ContentHandler::makeParserOptions() is deprecated. Use WikiPage::makeParserOptions() or ParserOptions::newCanonical() instead. +* (T100681) Use of the Parsoid v1 API with the VirtualRESTService, deprecated in + MediaWiki 1.26, is now hard-deprecated. All known clients were converted to + the Parsoid v3 API in May 2015. === Other changes in 1.32 === * (T198811) The following tables have had their UNIQUE indexes turned into proper diff --git a/includes/libs/virtualrest/ParsoidVirtualRESTService.php b/includes/libs/virtualrest/ParsoidVirtualRESTService.php index 37a967fff6..73ecc9dc26 100644 --- a/includes/libs/virtualrest/ParsoidVirtualRESTService.php +++ b/includes/libs/virtualrest/ParsoidVirtualRESTService.php @@ -150,8 +150,10 @@ class ParsoidVirtualRESTService extends VirtualRESTService { * @param Closure $idGeneratorFunc * @return array * @throws Exception + * @deprecated since 1.26, upgrade your client to issue v3 requests. */ public function onParsoid1Request( array $req, Closure $idGeneratorFunc ) { + wfDeprecated( __METHOD__, '1.26' ); $parts = explode( '/', $req['url'] ); list( $targetWiki, // 'local' diff --git a/includes/libs/virtualrest/RestbaseVirtualRESTService.php b/includes/libs/virtualrest/RestbaseVirtualRESTService.php index 192b4bd43d..d31e735314 100644 --- a/includes/libs/virtualrest/RestbaseVirtualRESTService.php +++ b/includes/libs/virtualrest/RestbaseVirtualRESTService.php @@ -153,8 +153,10 @@ class RestbaseVirtualRESTService extends VirtualRESTService { * @param Closure $idGeneratorFunc * @return array * @throws Exception + * @deprecated since 1.26, upgrade your client to issue v3 requests. */ public function onParsoid1Request( array $req, Closure $idGeneratorFunc ) { + wfDeprecated( __METHOD__, '1.26' ); $parts = explode( '/', $req['url'] ); list( $targetWiki, // 'local'