From 89e043452d0112c12dac0a4e4c1b1f48da674689 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Fri, 5 Feb 2016 12:37:55 -0800 Subject: [PATCH] [BREAKING CHANGE] Drop support for contacting Parsoid without VirtualRestConfig Change-Id: I3f7c3f8326c6fa76bd49e53c9fd2a24de9568f13 --- ApiVisualEditor.php | 18 +++++++----------- extension.json | 6 ------ 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php index de54719640..defa71a0ad 100644 --- a/ApiVisualEditor.php +++ b/ApiVisualEditor.php @@ -43,7 +43,7 @@ class ApiVisualEditor extends ApiBase { // the VRS class to use, defaults to Parsoid $class = ParsoidVirtualRESTService::class; $config = $this->veConfig; - // the global virtual rest service config object, if any + // The global virtual rest service config object, if any $vrs = $this->getConfig()->get( 'VirtualRestConfig' ); if ( isset( $vrs['modules'] ) && isset( $vrs['modules']['restbase'] ) ) { // if restbase is available, use it @@ -56,16 +56,12 @@ class ApiVisualEditor extends ApiBase { $params = $vrs['modules']['parsoid']; $params['restbaseCompat'] = true; } else { - // no global modules defined, fall back to old defaults - $params = [ - 'URL' => $config->get( 'VisualEditorParsoidURL' ), - 'prefix' => $config->get( 'VisualEditorParsoidPrefix' ), - 'domain' => $config->get( 'VisualEditorParsoidDomain' ), - 'timeout' => $config->get( 'VisualEditorParsoidTimeout' ), - 'HTTPProxy' => $config->get( 'VisualEditorParsoidHTTPProxy' ), - 'forwardCookies' => $config->get( 'VisualEditorParsoidForwardCookies' ), - 'restbaseCompat' => true - ]; + // No global modules defined, so no way to contact the document server. + $this->dieUsage( + 'The VirtualRESTService for the document server is not defined; see ' . + 'https://www.mediawiki.org/wiki/Extension:VisualEditor', + 'no_vrs' + ); } // merge the global and service-specific params if ( isset( $vrs['global'] ) ) { diff --git a/extension.json b/extension.json index ba1c6ab2fd..50f5f815ad 100644 --- a/extension.json +++ b/extension.json @@ -37,11 +37,8 @@ "VisualEditorFeedbackTitle": false, "VisualEditorSerializationCacheTimeout": 3600, "VisualEditorUseChangeTagging": true, - "VisualEditorParsoidPrefix": "localhost", - "VisualEditorParsoidDomain": "localhost", "VisualEditorDisableForAnons": false, "VisualEditorPluginModules": [], - "VisualEditorParsoidForwardCookies": false, "VisualEditorTabMessages": { "edit": null, "editsource": "visualeditor-ca-editsource", @@ -53,7 +50,6 @@ "editsectionsource": "visualeditor-ca-editsource-section" }, "VisualEditorShowBetaWelcome": true, - "VisualEditorParsoidHTTPProxy": false, "VisualEditorBrowserBlacklist": { "android": [ [ @@ -89,7 +85,6 @@ "silk": null }, "VisualEditorTabPosition": "before", - "VisualEditorParsoidURL": "http://localhost:8000", "VisualEditorNewAccountEnableProportion": false, "VisualEditorEnableTocWidget": false, "VisualEditorEnableWikitext": false, @@ -106,7 +101,6 @@ "_merge_strategy": "array_plus" }, "VisualEditorSkinToolbarScrollOffset": [], - "VisualEditorParsoidTimeout": 100, "VisualEditorUseSingleEditTab": false, "VisualEditorSingleEditTabSwitchTime": 20160101000000 },