Parser: Emit deprecation warnings for ParserLimitReport hook
authorKunal Mehta <legoktm@member.fsf.org>
Sat, 24 Jun 2017 00:37:31 +0000 (17:37 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Sat, 24 Jun 2017 00:37:31 +0000 (17:37 -0700)
Change-Id: I351f0867132acf8d5cc9ee51b575744445b28b77

includes/parser/Parser.php

index d8722ba..5256733 100644 (file)
@@ -550,7 +550,8 @@ class Parser {
                        // Since we're not really outputting HTML, decode the entities and
                        // then re-encode the things that need hiding inside HTML comments.
                        $limitReport = htmlspecialchars_decode( $limitReport );
                        // Since we're not really outputting HTML, decode the entities and
                        // then re-encode the things that need hiding inside HTML comments.
                        $limitReport = htmlspecialchars_decode( $limitReport );
-                       Hooks::run( 'ParserLimitReport', [ $this, &$limitReport ] );
+                       // Run deprecated hook
+                       Hooks::run( 'ParserLimitReport', [ $this, &$limitReport ], '1.22' );
 
                        // Sanitize for comment. Note '‐' in the replacement is U+2010,
                        // which looks much like the problematic '-'.
 
                        // Sanitize for comment. Note '‐' in the replacement is U+2010,
                        // which looks much like the problematic '-'.