From 11b90976ca6a4aa0eac36fab24501e264ada8728 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Fri, 13 Jul 2018 16:59:57 -0400 Subject: [PATCH] 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 --- RELEASE-NOTES-1.32 | 3 +++ includes/libs/virtualrest/ParsoidVirtualRESTService.php | 2 ++ includes/libs/virtualrest/RestbaseVirtualRESTService.php | 2 ++ 3 files changed, 7 insertions(+) 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' -- 2.20.1