The UtfNormal\Utils class from the utfnormal library should be used instead.
* The deprecated UTF8_ and UNICODE_ constants were removed. The class constants
from the UtfNormal\Constants class from the utfnormal library should be used
+* (T140807) The wgResourceLoaderLESSImportPaths configuration option was removed
+ from ResourceLoader. Instead, use `@import` statements in LESS to import
+ files directly from nearby directories within the same project.
=== Deprecations in 1.32 ===
* Use of a StartProfiler.php file is deprecated in favour of placing
'deviceWidthTablet' => '720px',
];
-/**
- * Default import paths for LESS modules. LESS files referenced in @import
- * statements will be looked up here first, and relative to the importing file
- * second. To avoid collisions, it's important for the LESS files in these
- * directories to have a common, predictable file name prefix.
- *
- * Extensions need not (and should not) register paths in
- * $wgResourceLoaderLESSImportPaths. The import path includes the path of the
- * currently compiling LESS file, which allows each extension to freely import
- * files from its own tree.
- *
- * @since 1.22
- */
-$wgResourceLoaderLESSImportPaths = [
- "$IP/resources/src/mediawiki.less/",
-];
-
/**
* Whether ResourceLoader should attempt to persist modules in localStorage on
* browsers that support the Web Storage API.
* @return Less_Parser
*/
public function getLessCompiler( $vars = [] ) {
+ global $IP;
// When called from the installer, it is possible that a required PHP extension
// is missing (at least for now; see T49564). If this is the case, throw an
// exception (caught by the installer) to prevent a fatal error later on.
$parser = new Less_Parser;
$parser->ModifyVars( $vars );
- $parser->SetImportDirs(
- array_fill_keys( $this->config->get( 'ResourceLoaderLESSImportPaths' ), '' )
- );
+ $parser->SetImportDirs( [
+ "$IP/resources/src/mediawiki.less/" => '',
+ ] );
$parser->SetOption( 'relativeUrls', false );
return $parser;
// Common Less mixin library for MediaWiki
//
-// By default the folder containing this file is included in $wgResourceLoaderLESSImportPaths,
+// By default the folder containing this file is included in the LESS import paths,
// which makes this file importable by all less files via `@import 'mediawiki.mixins';`.
//
// The mixins included below are considered a public interface for MediaWiki extensions.
parent::setUp();
$this->setMwGlobals( [
- 'wgResourceLoaderLESSImportPaths' => [],
'wgResourceLoaderLESSVars' => [
'foo' => '2px',
'Foo' => '#eeeeee',