From 0cd1ebdcb2459409e56f5dfa3a493d19397dc3e3 Mon Sep 17 00:00:00 2001 From: mainframe98 Date: Fri, 26 Mar 2021 17:48:54 +0100 Subject: [PATCH] Deprecate the EditPageBeforeEditToolbar hook This hook has become defunct after the classic edit toolbar was removed. Its only uses are to disable it, which is pointless as the toolbar doesn't display when the hook doesn't provide any content. Bug: T278563 Change-Id: I3285d01715f32a028ea9d5710800c4fd30fe1c59 --- RELEASE-NOTES-1.36 | 3 +++ includes/Hook/EditPageBeforeEditToolbarHook.php | 1 + includes/HookContainer/DeprecatedHooks.php | 1 + 3 files changed, 5 insertions(+) diff --git a/RELEASE-NOTES-1.36 b/RELEASE-NOTES-1.36 index 299465f8366..7ff29c1cc77 100644 --- a/RELEASE-NOTES-1.36 +++ b/RELEASE-NOTES-1.36 @@ -729,6 +729,9 @@ because of Phabricator reports. ::authorizeMerge instead. * User::isValidUserName(), deprecated in 1.35, is hard deprecated. Use the UserNameUtils service instead. +* The EditPageBeforeEditToolbar hook has been deprecated; it has become + defunct after the classic edit toolbar was removed. Use one of the many + other EditPage hooks instead. * … === Other changes in 1.36 === diff --git a/includes/Hook/EditPageBeforeEditToolbarHook.php b/includes/Hook/EditPageBeforeEditToolbarHook.php index 3a3bdbc6d3b..bc291634e6f 100644 --- a/includes/Hook/EditPageBeforeEditToolbarHook.php +++ b/includes/Hook/EditPageBeforeEditToolbarHook.php @@ -14,6 +14,7 @@ interface EditPageBeforeEditToolbarHook { * Use this hook to add an edit toolbar above the textarea in the edit form. * * @since 1.35 + * @deprecated 1.36 Use one of the many other EditPage hooks instead * * @param string &$toolbar Toolbar HTML, initially an empty `
` * @return bool|void True or no return value to continue, or false to have diff --git a/includes/HookContainer/DeprecatedHooks.php b/includes/HookContainer/DeprecatedHooks.php index 04663e0a719..0cafc045279 100644 --- a/includes/HookContainer/DeprecatedHooks.php +++ b/includes/HookContainer/DeprecatedHooks.php @@ -47,6 +47,7 @@ class DeprecatedHooks { 'CanIPUseHTTPS' => [ 'deprecatedVersion' => '1.35' ], 'DiffRevisionTools' => [ 'deprecatedVersion => 1.35' ], 'DiffViewHeader' => [ 'deprecatedVersion' => '1.35' ], + 'EditPageBeforeEditToolbar' => [ 'deprecatedVersion' => '1.36' ], 'HistoryRevisionTools' => [ 'deprecatedVersion => 1.35' ], 'InternalParseBeforeSanitize' => [ 'deprecatedVersion' => '1.35' ], 'MagicWordwgVariableIDs' => [ 'deprecatedVersion' => '1.35', 'silent' => true ],