Deprecate use of template directory relative to core
Warning now issued since skins have been updated. Additional change: Previously deprecations in release notes were in the wrong section (Relating to ResourceLoaderSkinModule) these are moved alongside the newly added deprecation note alongside other skin deprecations. Bug: T262067 Depends-On: I52bee67732cc72ec6857b6fc10cfbdd89ef9b8db Depends-On: I338198878e78cb5c6f47c53fdf18d3944655e965 Change-Id: Ic60524fe3c054706dbea15cc04235e979952e9f5
This commit is contained in:
parent
5b27523cee
commit
7746dd3eb5
3 changed files with 7 additions and 1 deletions
|
|
@ -675,6 +675,8 @@ because of Phabricator reports.
|
||||||
BaseTemplateAfterPortlet hook, which were deprecated in 1.35,
|
BaseTemplateAfterPortlet hook, which were deprecated in 1.35,
|
||||||
now emit deprecation warnings.
|
now emit deprecation warnings.
|
||||||
* The LocalFile::getHistory() hook is deprecated.
|
* 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
|
* Calling WikiPage::prepareContentForEdit() without a UserIdentity is now
|
||||||
deprecated.
|
deprecated.
|
||||||
* User::getEditTokenObject(), ::getEditToken(), and ::matchEditToken() were each
|
* User::getEditTokenObject(), ::getEditToken(), and ::matchEditToken() were each
|
||||||
|
|
|
||||||
|
|
@ -638,8 +638,11 @@ class ExtensionProcessor implements Processor {
|
||||||
if ( is_dir( $correctedPath ) ) {
|
if ( is_dir( $correctedPath ) ) {
|
||||||
$data['args'][0]['templateDirectory'] = $correctedPath;
|
$data['args'][0]['templateDirectory'] = $correctedPath;
|
||||||
} else {
|
} else {
|
||||||
// TODO: deprecate directories relative to core.
|
|
||||||
$data['args'][0]['templateDirectory'] = $templateDirectory;
|
$data['args'][0]['templateDirectory'] = $templateDirectory;
|
||||||
|
wfDeprecatedMsg(
|
||||||
|
'Template directory should be relative to skin or omitted.',
|
||||||
|
'1.37'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} elseif ( isset( $data['args'][0] ) ) {
|
} elseif ( isset( $data['args'][0] ) ) {
|
||||||
// If not set, we set a sensible default.
|
// If not set, we set a sensible default.
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ class ExtensionProcessorTest extends MediaWikiIntegrationTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testExtractSkins() {
|
public function testExtractSkins() {
|
||||||
|
$this->expectDeprecation();
|
||||||
$processor = new ExtensionProcessor();
|
$processor = new ExtensionProcessor();
|
||||||
$processor->extractInfo( $this->dir, self::$default + [
|
$processor->extractInfo( $this->dir, self::$default + [
|
||||||
'ValidSkinNames' => [
|
'ValidSkinNames' => [
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue