jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/376866 )
Change subject: Hard deprecate wfRunHooks()
..
Hard deprecate wfRunHooks()
Deprecated since 1.25, very few callers. Having to grep for 2
ways of calling a hook is harmful not only because it wastes developers'
time, but also because it makes it possible to forget to search for the
old way, resulting in mistakes. Better get rid of this.
Change-Id: Iab28bd5758475b780c2016847881757d64973862
---
M includes/GlobalFunctions.php
M tests/phpunit/includes/HooksTest.php
2 files changed, 3 insertions(+), 0 deletions(-)
Approvals:
Krinkle: Looks good to me, but someone else must approve
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index ffdfc92..1cff881 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -3232,6 +3232,7 @@
* @deprecated since 1.25 - use Hooks::run
*/
function wfRunHooks( $event, array $args = [], $deprecatedVersion = null ) {
+ wfDeprecated( __METHOD__, '1.25' );
return Hooks::run( $event, $args, $deprecatedVersion );
}
diff --git a/tests/phpunit/includes/HooksTest.php
b/tests/phpunit/includes/HooksTest.php
index 87acb52..6660516 100644
--- a/tests/phpunit/includes/HooksTest.php
+++ b/tests/phpunit/includes/HooksTest.php
@@ -54,6 +54,8 @@
*/
public function testOldStyleHooks( $msg, array $hook, $expectedFoo,
$expectedBar ) {
global $wgHooks;
+
+ $this->hideDeprecated( 'wfRunHooks' );
$foo = $bar = 'original';
$wgHooks['MediaWikiHooksTest001'][] = $hook;
--
To view, visit https://gerrit.wikimedia.org/r/376866
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iab28bd5758475b780c2016847881757d64973862
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem
Gerrit-Reviewer: Jeroen De Dauw
Gerrit-Reviewer: Jforrester
Gerrit-Reviewer: Krinkle
Gerrit-Reviewer: Legoktm
Gerrit-Reviewer: MaxSem
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits