diff --git a/RELEASE-NOTES-1.37 b/RELEASE-NOTES-1.37 index 91373e79db3..e1b53252ecb 100644 --- a/RELEASE-NOTES-1.37 +++ b/RELEASE-NOTES-1.37 @@ -675,6 +675,8 @@ because of Phabricator reports. BaseTemplateAfterPortlet hook, which were deprecated in 1.35, now emit deprecation warnings. * The LocalFile::getHistory() hook is deprecated. +* Previously the Skin templateDirectory option inside skin.json had to be + relative to MediaWiki core. This should now be relative to the skin. * Calling WikiPage::prepareContentForEdit() without a UserIdentity is now deprecated. * User::getEditTokenObject(), ::getEditToken(), and ::matchEditToken() were each diff --git a/includes/registration/ExtensionProcessor.php b/includes/registration/ExtensionProcessor.php index b6b4212b976..92982763cf4 100644 --- a/includes/registration/ExtensionProcessor.php +++ b/includes/registration/ExtensionProcessor.php @@ -638,8 +638,11 @@ class ExtensionProcessor implements Processor { if ( is_dir( $correctedPath ) ) { $data['args'][0]['templateDirectory'] = $correctedPath; } else { - // TODO: deprecate directories relative to core. $data['args'][0]['templateDirectory'] = $templateDirectory; + wfDeprecatedMsg( + 'Template directory should be relative to skin or omitted.', + '1.37' + ); } } elseif ( isset( $data['args'][0] ) ) { // If not set, we set a sensible default. diff --git a/tests/phpunit/includes/registration/ExtensionProcessorTest.php b/tests/phpunit/includes/registration/ExtensionProcessorTest.php index 9fe702f2343..d1c675f9b23 100644 --- a/tests/phpunit/includes/registration/ExtensionProcessorTest.php +++ b/tests/phpunit/includes/registration/ExtensionProcessorTest.php @@ -63,6 +63,7 @@ class ExtensionProcessorTest extends MediaWikiIntegrationTestCase { } public function testExtractSkins() { + $this->expectDeprecation(); $processor = new ExtensionProcessor(); $processor->extractInfo( $this->dir, self::$default + [ 'ValidSkinNames' => [