From 7b23382823f2ea7bab8d20ad68950ff34f50a005 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Tue, 26 Jun 2018 09:58:47 -0400 Subject: [PATCH] Soft deprecate non-Remex tidy configurations Future parsers will not be able to emit output compatible with these configurations. Bug: T198214 Change-Id: Id7921a166a62457f289e6c0c4bba6c8563be4760 --- RELEASE-NOTES-1.32 | 2 ++ includes/DefaultSettings.php | 6 +++++- includes/tidy/RaggettBase.php | 3 +++ includes/tidy/RaggettExternal.php | 3 +++ includes/tidy/RaggettInternalHHVM.php | 3 +++ includes/tidy/RaggettInternalPHP.php | 3 +++ includes/tidy/RaggettWrapper.php | 1 + 7 files changed, 20 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index de091ca9be..9f0bc1b777 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -449,6 +449,8 @@ because of Phabricator reports. in MediaWiki 1.26, have now been hard deprecated. This affects $wgUseTidy, $wgTidyBin, $wgTidyConf, $wgTidyOpts, $wgTidyInternal, and $wgDebugTidy. Use $wgTidyConfig instead. +* All Tidy configurations other than Remex have been deprecated; future parsers + will not emit compatible output for these configurations. === Other changes in 1.32 === * (T198811) The following tables have had their UNIQUE indexes turned into diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 0fa2a9f01e..d335dccac0 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4277,12 +4277,16 @@ $wgAllowImageTag = false; * * Keys are: * - driver: May be: + * - RemexHtml: Use the RemexHtml library in PHP * - RaggettInternalHHVM: Use the limited-functionality HHVM extension + * Deprecated since 1.32. * - RaggettInternalPHP: Use the PECL extension + * Deprecated since 1.32. * - RaggettExternal: Shell out to an external binary (tidyBin) - * - RemexHtml: Use the RemexHtml library in PHP + * Deprecated since 1.32. * - disabled: Disable tidy pass and use a hacky pure PHP workaround * (this is what setting $wgUseTidy to false used to do) + * Deprecated since 1.32. * * - tidyConfigFile: Path to configuration file for any of the Raggett drivers * - debugComment: True to add a comment to the output with warning messages diff --git a/includes/tidy/RaggettBase.php b/includes/tidy/RaggettBase.php index ccef56b34c..ed91735804 100644 --- a/includes/tidy/RaggettBase.php +++ b/includes/tidy/RaggettBase.php @@ -4,6 +4,9 @@ namespace MediaWiki\Tidy; use MWException; +/** + * @deprecated since 1.32, use RemexDriver + */ abstract class RaggettBase extends TidyDriverBase { /** * Generic interface for wrapping and unwrapping HTML for Dave Raggett's tidy. diff --git a/includes/tidy/RaggettExternal.php b/includes/tidy/RaggettExternal.php index 2809ea47d4..0b485c7cc6 100644 --- a/includes/tidy/RaggettExternal.php +++ b/includes/tidy/RaggettExternal.php @@ -2,6 +2,9 @@ namespace MediaWiki\Tidy; +/** + * @deprecated since 1.32, use RemexDriver + */ class RaggettExternal extends RaggettBase { /** * Spawn an external HTML tidy process and get corrected markup back from it. diff --git a/includes/tidy/RaggettInternalHHVM.php b/includes/tidy/RaggettInternalHHVM.php index 65d37f4f07..1681dc45e4 100644 --- a/includes/tidy/RaggettInternalHHVM.php +++ b/includes/tidy/RaggettInternalHHVM.php @@ -2,6 +2,9 @@ namespace MediaWiki\Tidy; +/** + * @deprecated since 1.32, use RemexDriver + */ class RaggettInternalHHVM extends RaggettBase { /** * Use the HTML tidy extension to use the tidy library in-process, diff --git a/includes/tidy/RaggettInternalPHP.php b/includes/tidy/RaggettInternalPHP.php index e7724b0164..c1050cc222 100644 --- a/includes/tidy/RaggettInternalPHP.php +++ b/includes/tidy/RaggettInternalPHP.php @@ -2,6 +2,9 @@ namespace MediaWiki\Tidy; +/** + * @deprecated since 1.32, use RemexDriver + */ class RaggettInternalPHP extends RaggettBase { /** * Use the HTML tidy extension to use the tidy library in-process, diff --git a/includes/tidy/RaggettWrapper.php b/includes/tidy/RaggettWrapper.php index b793a58af7..855282d342 100644 --- a/includes/tidy/RaggettWrapper.php +++ b/includes/tidy/RaggettWrapper.php @@ -15,6 +15,7 @@ use Parser; * duplicated. Perhaps we should create an abstract marker hiding class. * * @ingroup Parser + * @deprecated since 1.32 */ class RaggettWrapper { -- 2.20.1