From d8b0d0bb30834064cd3613cd5698515b5ea9689e Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 17 Apr 2018 01:42:00 +0100 Subject: [PATCH] resourceloader: Remove getHashMtime() and getDefinitionMtime() methods Deprecated since 1.26, no callers or implementors in Wikimedia Git. Change-Id: Ie44b4be47db7a4799fe39d66294c41238c62f51f --- RELEASE-NOTES-1.31 | 2 ++ .../resourceloader/ResourceLoaderModule.php | 35 ------------------- 2 files changed, 2 insertions(+), 35 deletions(-) diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31 index 3de040273a..21b29cb4d1 100644 --- a/RELEASE-NOTES-1.31 +++ b/RELEASE-NOTES-1.31 @@ -257,6 +257,8 @@ changes to languages because of Phabricator reports. $wgValidateAllHtml configuration option is removed and will be ignored. * Execution of external programs using MediaWiki\Shell\Command now applies RESTRICT_DEFAULT Firejail restriction by default. +* The ResourceLoaderModule::getHashMtime() and ::getDefinitionMtime() methods, + deprecated in 1.26, were removed. === Deprecations in 1.31 === * The Revision class was deprecated in favor of RevisionStore, BlobStore, and diff --git a/includes/resourceloader/ResourceLoaderModule.php b/includes/resourceloader/ResourceLoaderModule.php index 8bf71705d6..6d1529b11a 100644 --- a/includes/resourceloader/ResourceLoaderModule.php +++ b/includes/resourceloader/ResourceLoaderModule.php @@ -937,41 +937,6 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface { return null; } - /** - * Back-compat dummy for old subclass implementations of getModifiedTime(). - * - * This method used to use ObjectCache to track when a hash was first seen. That principle - * stems from a time that ResourceLoader could only identify module versions by timestamp. - * That is no longer the case. Use getDefinitionSummary() directly. - * - * @deprecated since 1.26 Superseded by getVersionHash() - * @param ResourceLoaderContext $context - * @return int UNIX timestamp - */ - public function getHashMtime( ResourceLoaderContext $context ) { - if ( !is_string( $this->getModifiedHash( $context ) ) ) { - return 1; - } - // Dummy that is > 1 - return 2; - } - - /** - * Back-compat dummy for old subclass implementations of getModifiedTime(). - * - * @since 1.23 - * @deprecated since 1.26 Superseded by getVersionHash() - * @param ResourceLoaderContext $context - * @return int UNIX timestamp - */ - public function getDefinitionMtime( ResourceLoaderContext $context ) { - if ( $this->getDefinitionSummary( $context ) === null ) { - return 1; - } - // Dummy that is > 1 - return 2; - } - /** * Check whether this module is known to be empty. If a child class * has an easy and cheap way to determine that this module is -- 2.20.1