Skip to content

Commit f4d5fea

Browse files
authored
Merge branch 'master' into dependabot/composer/phpstan/phpstan-tw-1.10.15or-tw-2.0.0
2 parents 3ac6f3e + 3adec61 commit f4d5fea

File tree

5 files changed

+42
-28
lines changed

5 files changed

+42
-28
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ jobs:
1515
strategy:
1616
matrix:
1717
include:
18-
- mw: 'REL1_39'
19-
php: 8.0
20-
experimental: false
21-
- mw: 'REL1_40'
22-
php: 8.1
23-
experimental: false
24-
- mw: 'REL1_41'
18+
- mw: 'REL1_43'
2519
php: 8.1
2620
experimental: false
27-
- mw: 'REL1_42'
21+
- mw: 'REL1_44'
2822
php: 8.2
23+
experimental: false
24+
- mw: 'REL1_45'
25+
php: 8.3
26+
experimental: false
27+
- mw: 'master'
28+
php: 8.4
2929
experimental: true
3030
- mw: 'master'
31-
php: 8.3
31+
php: 8.5
3232
experimental: true
3333

3434
runs-on: ubuntu-latest
@@ -86,8 +86,8 @@ jobs:
8686
strategy:
8787
matrix:
8888
include:
89-
- mw: 'REL1_39'
90-
php: '8.0'
89+
- mw: 'REL1_43'
90+
php: '8.1'
9191

9292
runs-on: ubuntu-latest
9393

@@ -112,8 +112,8 @@ jobs:
112112
strategy:
113113
matrix:
114114
include:
115-
- mw: 'REL1_39'
116-
php: '8.0'
115+
- mw: 'REL1_43'
116+
php: '8.1'
117117

118118
runs-on: ubuntu-latest
119119

@@ -173,8 +173,8 @@ jobs:
173173
strategy:
174174
matrix:
175175
include:
176-
- mw: 'REL1_39'
177-
php: '8.0'
176+
- mw: 'REL1_43'
177+
php: '8.1'
178178

179179
runs-on: ubuntu-latest
180180

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# MediaWiki SCSS library
22

33
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ProfessionalWiki/SCSS/ci.yml?branch=master)](https://github.com/ProfessionalWiki/SCSS/actions?query=workflow%3ACI)
4-
[![Latest Stable Version](https://poser.pugx.org/mediawiki/scss/version.png)](https://packagist.org/packages/mediawiki/scss)
4+
[![Latest Stable Version](https://poser.pugx.org/mediawiki/scss/v/stable)](https://packagist.org/packages/mediawiki/scss)
55
[![License](https://poser.pugx.org/mediawiki/scss/license)](https://packagist.org/packages/mediawiki/scss)
66

77
The MediaWiki SCSS library provides a ResourceLoader module capable of compiling [SCSS].
88

99
## Requirements
1010

11-
- [PHP] 8.0 or later
12-
- [MediaWiki] 1.39 or later
11+
- [PHP] 8.1 or later
12+
- [MediaWiki] 1.43 or later
1313
- [Composer]
1414

1515
## Use
@@ -123,6 +123,15 @@ version 3][license] (or any later version).
123123

124124
## Release notes
125125

126+
### Version 5.0.0
127+
128+
Released on 2025-12-20
129+
130+
* Raised minimum MediaWiki version from 1.39 to 1.43
131+
* Raised minimum PHP version from 8.0 to 8.1
132+
* Raised minimum `scssphp` version from 1.12.1 to 1.13.0
133+
* Fixed MediaWiki 1.43 deprecations
134+
126135
### Version 4.0.0
127136

128137
Released on 2024-04-25

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@
3636
"rss": "https://github.com/ProfessionalWiki/SCSS/releases.atom"
3737
},
3838
"require": {
39-
"php": ">=8.0",
40-
"scssphp/scssphp": "^1.12.1"
39+
"php": ">=8.1",
40+
"scssphp/scssphp": "^1.13.0"
4141
},
4242
"require-dev": {
4343
"phpunit/phpunit": "^9.6.8",
4444
"vimeo/psalm": "^5.12.0",
45-
"phpstan/phpstan": "^1.10.15 || ^2.0.0",
46-
"mediawiki/mediawiki-codesniffer": "^44.0.0 || ^45.0.0",
45+
"phpstan/phpstan": "^2.0.0",
46+
"mediawiki/mediawiki-codesniffer": "^46.0.0",
4747
"slevomat/coding-standard": "^v8.11.1"
4848
},
4949
"autoload": {
@@ -54,7 +54,7 @@
5454
},
5555
"extra": {
5656
"branch-alias": {
57-
"dev-master": "4.x-dev"
57+
"dev-master": "5.x-dev"
5858
}
5959
},
6060
"config": {

src/ResourceLoaderSCSSModule.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@
2525

2626
namespace SCSS;
2727

28-
use BagOStuff;
2928
use CSSJanus;
3029
use Exception;
30+
use MediaWiki\MediaWikiServices;
3131
use MediaWiki\ResourceLoader\Context;
3232
use MediaWiki\ResourceLoader\FileModule;
3333
use MediaWiki\ResourceLoader\FilePath;
34-
use ObjectCache;
34+
use ObjectCacheFactory;
3535
use ScssPhp\ScssPhp\Compiler;
36+
use Wikimedia\ObjectCache\BagOStuff;
3637

3738
/**
3839
* ResourceLoader module based on local JavaScript/SCSS files.
@@ -138,12 +139,16 @@ protected function retrieveStylesFromCache( Context $context ): void {
138139

139140
protected function getCache(): BagOStuff {
140141
if ( $this->cache === null ) {
141-
$this->cache = ObjectCache::getInstance( $this->getCacheType() );
142+
$this->cache = $this->getObjectCacheFactory()->getInstance( $this->getCacheType() );
142143
}
143144

144145
return $this->cache;
145146
}
146147

148+
private function getObjectCacheFactory(): ObjectCacheFactory {
149+
return MediaWikiServices::getInstance()->getObjectCacheFactory();
150+
}
151+
147152
private function getCacheType(): int {
148153
return array_key_exists( 'egScssCacheType', $GLOBALS ) ? (int)$GLOBALS[ 'egScssCacheType' ] : -1;
149154
}
@@ -168,7 +173,7 @@ protected function getCacheKey( Context $context ): string {
168173
// have to hash the module config, else it may become too long
169174
$configHash = md5( $styles . $vars );
170175

171-
$this->cacheKey = \ObjectCache::getLocalClusterInstance()->makeKey(
176+
$this->cacheKey = $this->getObjectCacheFactory()->getLocalClusterInstance()->makeKey(
172177
'ext',
173178
'scss',
174179
$configHash,

tests/phpunit/ResourceLoaderSCSSModuleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525

2626
namespace SCSS\Tests;
2727

28-
use HashBagOStuff;
2928
use MediaWiki\ResourceLoader\Context;
3029
use PHPUnit\Framework\TestCase;
3130
use SCSS\ResourceLoaderSCSSModule;
31+
use Wikimedia\ObjectCache\HashBagOStuff;
3232

3333
/**
3434
* @covers \SCSS\ResourceLoaderSCSSModule

0 commit comments

Comments
 (0)