Merge "Deprecate Skin::getSkinStylePath()"

This commit is contained in:
jenkins-bot 2020-12-23 16:00:23 +00:00 committed by Gerrit Code Review
commit 5c6a4e0c71
2 changed files with 6 additions and 0 deletions

View file

@ -452,6 +452,8 @@ because of Phabricator reports.
prefixes). In test cases please use $wgInterwikiCache instead.
* MediaWikiIntegrationTestCase::assertType, hard-deprecated in 1.35 due to
incompatibility with PHPUnit 8, was removed.
* Skin::getSkinStylePath() has been deprecated. Please replace usages with
the direct path to the resources.
* …
=== Other changes in 1.36 ===

View file

@ -169,9 +169,11 @@ abstract class Skin extends ContextSource {
$this->skinname = $options;
} elseif ( $options ) {
$name = $options['name'] ?? null;
if ( !$name ) {
throw new SkinException( 'Skin name must be specified' );
}
$this->options = $options;
$this->skinname = $name;
}
@ -1265,6 +1267,8 @@ abstract class Skin extends ContextSource {
*
* Requires $stylename to be set, otherwise throws MWException.
*
* @deprecated since 1.36, Replace usages with direct path of
* the resource and then remove the $stylename property.
* @param string $name The name or path of a skin resource file
* @return string The fully resolved style path URL
* @throws MWException