Merge "Drop deprecated config $wgLogoHD"
This commit is contained in:
commit
939fa4e5e5
8 changed files with 2 additions and 111 deletions
|
|
@ -46,6 +46,7 @@ For notes on 1.41.x and older releases, see HISTORY.
|
|||
* $wgJobSerialCommitThreshold has been removed without deprecation,
|
||||
it wasn't used anywhere according to codesearch and any setups using this
|
||||
config will perform just fine but might be less performant.
|
||||
* $wgLogoHD, deprecated since 1.35, has been removed. Use $wgLogo instead.
|
||||
* …
|
||||
|
||||
=== New user-facing features in 1.42 ===
|
||||
|
|
|
|||
|
|
@ -282,39 +282,6 @@ config-schema:
|
|||
Defaults to [ "1x" => $wgLogo ],
|
||||
or [ "1x" => "$wgResourceBasePath/resources/assets/change-your-logo.svg" ] if $wgLogo is not set.
|
||||
@since 1.35
|
||||
LogoHD:
|
||||
default: false
|
||||
type:
|
||||
- object
|
||||
- boolean
|
||||
deprecated: |-
|
||||
since 1.35. Developers should retrieve this logo (and other variants) using
|
||||
the static function MediaWiki\ResourceLoader\SkinModule::getAvailableLogos.
|
||||
$wgLogos should be used instead.
|
||||
description: |-
|
||||
Array with URL paths to HD versions of the wiki logo. The scaled logo size
|
||||
should be under 135x155 pixels.
|
||||
Only 1.5x and 2x versions are supported.
|
||||
@par Example:
|
||||
@code
|
||||
$wgLogoHD = [
|
||||
"1.5x" => "path/to/1.5x_version.png",
|
||||
"2x" => "path/to/2x_version.png"
|
||||
];
|
||||
@endcode
|
||||
SVG is also supported but when enabled, it
|
||||
disables 1.5x and 2x as svg will already
|
||||
be optimised for screen resolution.
|
||||
@par Example:
|
||||
@code
|
||||
$wgLogoHD = [
|
||||
"svg" => "path/to/svg_version.svg",
|
||||
];
|
||||
@endcode
|
||||
@since 1.25
|
||||
@deprecated since 1.35. Developers should retrieve this logo (and other variants) using
|
||||
the static function MediaWiki\ResourceLoader\SkinModule::getAvailableLogos.
|
||||
$wgLogos should be used instead.
|
||||
Favicon:
|
||||
default: /favicon.ico
|
||||
description: |-
|
||||
|
|
|
|||
|
|
@ -168,15 +168,6 @@ $wgLogo = null;
|
|||
*/
|
||||
$wgLogos = null;
|
||||
|
||||
/**
|
||||
* Config variable stub for the LogoHD setting, for use by phpdoc and IDEs.
|
||||
* @see MediaWiki\MainConfigSchema::LogoHD
|
||||
* @deprecated since 1.35. Developers should retrieve this logo (and other variants) using
|
||||
* the static function MediaWiki\ResourceLoader\SkinModule::getAvailableLogos.
|
||||
* $wgLogos should be used instead.
|
||||
*/
|
||||
$wgLogoHD = null;
|
||||
|
||||
/**
|
||||
* Config variable stub for the Favicon setting, for use by phpdoc and IDEs.
|
||||
* @see MediaWiki\MainConfigSchema::Favicon
|
||||
|
|
|
|||
|
|
@ -183,15 +183,6 @@ class MainConfigNames {
|
|||
*/
|
||||
public const Logos = 'Logos';
|
||||
|
||||
/**
|
||||
* Name constant for the LogoHD setting, for use with Config::get()
|
||||
* @see MainConfigSchema::LogoHD
|
||||
* @deprecated since 1.35. Developers should retrieve this logo (and other variants) using
|
||||
* the static function MediaWiki\ResourceLoader\SkinModule::getAvailableLogos.
|
||||
* $wgLogos should be used instead.
|
||||
*/
|
||||
public const LogoHD = 'LogoHD';
|
||||
|
||||
/**
|
||||
* Name constant for the Favicon setting, for use with Config::get()
|
||||
* @see MainConfigSchema::Favicon
|
||||
|
|
|
|||
|
|
@ -692,43 +692,6 @@ class MainConfigSchema {
|
|||
'type' => 'map|false',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array with URL paths to HD versions of the wiki logo. The scaled logo size
|
||||
* should be under 135x155 pixels.
|
||||
* Only 1.5x and 2x versions are supported.
|
||||
*
|
||||
* @par Example:
|
||||
* @code
|
||||
* $wgLogoHD = [
|
||||
* "1.5x" => "path/to/1.5x_version.png",
|
||||
* "2x" => "path/to/2x_version.png"
|
||||
* ];
|
||||
* @endcode
|
||||
*
|
||||
* SVG is also supported but when enabled, it
|
||||
* disables 1.5x and 2x as svg will already
|
||||
* be optimised for screen resolution.
|
||||
*
|
||||
* @par Example:
|
||||
* @code
|
||||
* $wgLogoHD = [
|
||||
* "svg" => "path/to/svg_version.svg",
|
||||
* ];
|
||||
* @endcode
|
||||
*
|
||||
* @since 1.25
|
||||
* @deprecated since 1.35. Developers should retrieve this logo (and other variants) using
|
||||
* the static function MediaWiki\ResourceLoader\SkinModule::getAvailableLogos.
|
||||
* $wgLogos should be used instead.
|
||||
*/
|
||||
public const LogoHD = [
|
||||
'default' => false,
|
||||
'type' => 'map|false',
|
||||
'deprecated' => 'since 1.35. Developers should retrieve this logo (and other variants) ' .
|
||||
'using the static function MediaWiki\ResourceLoader\SkinModule::getAvailableLogos. $wgLogos ' .
|
||||
'should be used instead.',
|
||||
];
|
||||
|
||||
/**
|
||||
* The URL path of the icon.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ namespace MediaWiki\ResourceLoader;
|
|||
|
||||
use InvalidArgumentException;
|
||||
use MediaWiki\Config\Config;
|
||||
use MediaWiki\Config\ConfigException;
|
||||
use MediaWiki\MainConfigNames;
|
||||
use MediaWiki\Output\OutputPage;
|
||||
use Wikimedia\Minify\CSSMin;
|
||||
|
|
@ -644,7 +643,7 @@ class SkinModule extends LessVarFileModule {
|
|||
$logos = $conf->get( MainConfigNames::Logos );
|
||||
if ( $logos === false ) {
|
||||
// no logos were defined... this will either
|
||||
// 1. Load from wgLogo and wgLogoHD
|
||||
// 1. Load from wgLogo
|
||||
// 2. Trigger runtime exception if those are not defined.
|
||||
$logos = [];
|
||||
}
|
||||
|
|
@ -662,17 +661,6 @@ class SkinModule extends LessVarFileModule {
|
|||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$logoHD = $conf->get( MainConfigNames::LogoHD );
|
||||
// make sure not false
|
||||
if ( $logoHD ) {
|
||||
// wfDeprecated( __METHOD__ . ' with $wgLogoHD set instead of $wgLogos', '1.35', false, 1 );
|
||||
$logos += $logoHD;
|
||||
}
|
||||
} catch ( ConfigException $e ) {
|
||||
// no backwards compatibility changes needed.
|
||||
}
|
||||
|
||||
if ( isset( $logos['wordmark'] ) ) {
|
||||
// Allow skins to scale the wordmark with browser font size (T207789)
|
||||
$logos['wordmark'] = self::getRelativeSizedLogo( $logos['wordmark'] );
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ return [
|
|||
'FileCacheDirectory' => false,
|
||||
'Logo' => false,
|
||||
'Logos' => false,
|
||||
'LogoHD' => false,
|
||||
'Favicon' => '/favicon.ico',
|
||||
'AppleTouchIcon' => false,
|
||||
'ReferrerPolicy' => false,
|
||||
|
|
@ -2529,10 +2528,6 @@ return [
|
|||
0 => 'object',
|
||||
1 => 'boolean',
|
||||
],
|
||||
'LogoHD' => [
|
||||
0 => 'object',
|
||||
1 => 'boolean',
|
||||
],
|
||||
'ReferrerPolicy' => [
|
||||
0 => 'array',
|
||||
1 => 'string',
|
||||
|
|
@ -3240,9 +3235,6 @@ return [
|
|||
],
|
||||
],
|
||||
'config-schema' => [
|
||||
'LogoHD' => [
|
||||
'deprecated' => 'since 1.35. Developers should retrieve this logo (and other variants) using the static function MediaWiki\\ResourceLoader\\SkinModule::getAvailableLogos. $wgLogos should be used instead.',
|
||||
],
|
||||
'UploadStashScalerBaseUrl' => [
|
||||
'deprecated' => 'since 1.36 Use thumbProxyUrl in $wgLocalFileRepo',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -263,7 +263,6 @@ class SkinModuleTest extends ResourceLoaderTestCase {
|
|||
$logos = SkinModule::getAvailableLogos( new HashConfig( [
|
||||
MainConfigNames::Logo => false,
|
||||
MainConfigNames::Logos => false,
|
||||
MainConfigNames::LogoHD => false,
|
||||
] ) );
|
||||
$this->assertSame( [], $logos );
|
||||
}
|
||||
|
|
@ -400,7 +399,6 @@ class SkinModuleTest extends ResourceLoaderTestCase {
|
|||
MainConfigNames::BaseDirectory => '/dummy',
|
||||
MainConfigNames::ResourceBasePath => '/w',
|
||||
MainConfigNames::Logo => false,
|
||||
MainConfigNames::LogoHD => false
|
||||
] + self::getSettings() ) );
|
||||
|
||||
$this->assertEquals( [ $result ], $module->getHeaders( $ctx ) );
|
||||
|
|
|
|||
Loading…
Reference in a new issue