Hard deprecate Parser::disableCache()
authorC. Scott Ananian <cscott@cscott.net>
Mon, 4 Nov 2019 19:31:21 +0000 (14:31 -0500)
committerJforrester <jforrester@wikimedia.org>
Mon, 4 Nov 2019 22:09:56 +0000 (22:09 +0000)
Among deployed extensions, only used in the Quiz extension.

Full list of uses (some false positives):
https://codesearch.wmflabs.org/search/?q=disableCache&i=nope&files=&repos=

Depends-On: I956a88120d07d76d1afa9d06e95d31055f9b07f1
Change-Id: I6419754de6cbc01af07b6c0eafb8396bd720a58d
(cherry picked from commit 8dbc866e91d5a06cc1c2ca70c48c6752ddb48944)

includes/parser/Parser.php

index 7f3bb23..474d9c7 100644 (file)
@@ -5978,6 +5978,7 @@ class Parser {
         * @deprecated since 1.28; use getOutput()->updateCacheExpiry()
         */
        public function disableCache() {
         * @deprecated since 1.28; use getOutput()->updateCacheExpiry()
         */
        public function disableCache() {
+               wfDeprecated( __METHOD__, '1.28' );
                $this->logger->debug( "Parser output marked as uncacheable." );
                if ( !$this->mOutput ) {
                        throw new MWException( __METHOD__ .
                $this->logger->debug( "Parser output marked as uncacheable." );
                if ( !$this->mOutput ) {
                        throw new MWException( __METHOD__ .