From 976943c9913b84210e20d7f6f1f0abfe2109d8d6 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Mon, 1 May 2017 17:28:32 -0700 Subject: [PATCH] resourceloader: Bump severity of style queue violation to Warning Previously it was only in debug logs (which are enabled in Jenkins, MediaWiki-Vagrant, Beta, and for mwdebug hosts in wmf-production). Turning it into a warning() will log it for regular requests as well which is the last step before we can consider hard enforcement. Bug: T92459 Change-Id: I87c7794c5cfe35521bf76cc42f94907001e9d24b --- RELEASE-NOTES-1.29 | 2 ++ includes/resourceloader/ResourceLoaderClientHtml.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29 index 12f9b547af..9a86f94409 100644 --- a/RELEASE-NOTES-1.29 +++ b/RELEASE-NOTES-1.29 @@ -335,6 +335,8 @@ changes to languages because of Phabricator reports. MediaWiki release tarball and in Wikimedia production by the WikiEditor extension in 2010. It is only shown to users if no other editor was installed, and leads to confusion. +* (T92459) Loading ResourceLoader modules containing JavaScript through + addModuleStyles() is deprecated and will log a warning server-side. == Compatibility == diff --git a/includes/resourceloader/ResourceLoaderClientHtml.php b/includes/resourceloader/ResourceLoaderClientHtml.php index 8c792ad3c1..b8f2fa53e1 100644 --- a/includes/resourceloader/ResourceLoaderClientHtml.php +++ b/includes/resourceloader/ResourceLoaderClientHtml.php @@ -170,7 +170,7 @@ class ResourceLoaderClientHtml { if ( $module->getType() !== ResourceLoaderModule::LOAD_STYLES ) { $logger = $rl->getLogger(); - $logger->debug( 'Unexpected general module "{module}" in styles queue.', [ + $logger->warning( 'Unexpected general module "{module}" in styles queue.', [ 'module' => $name, ] ); } else { -- 2.20.1