Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI for MW 1.42/43 #896

Merged
merged 8 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@ jobs:
database_image: "mariadb:11.2"
coverage: false
experimental: false
- mediawiki_version: '1.42'
smw_version: dev-master
pf_version: 5.9
sfs_version: dev-master
php_version: 8.1
database_type: mysql
database_image: "mariadb:11.2"
coverage: false
experimental: false
- mediawiki_version: '1.43'
smw_version: dev-master
pf_version: 5.9
sfs_version: dev-master
php_version: 8.1
database_type: mysql
database_image: "mariadb:11.2"
coverage: false
experimental: false

env:
MW_VERSION: ${{ matrix.mediawiki_version }}
Expand Down
4 changes: 2 additions & 2 deletions SemanticResultFormats.utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ public static function htmlQueryResultLink( $link ) {
* @return string|WrappedString HTML
*/
public static function makeVariablesScript( $data, $nonce = null ) {
$script = ResourceLoader::makeConfigSetScript( $data );
$script = MediaWiki\ResourceLoader\ResourceLoader::makeConfigSetScript( $data );
if ( $nonce === null ) {
$nonce = RequestContext::getMain()->getOutput()->getCSP()->getNonce();
}

return ResourceLoader::makeInlineScript( $script, $nonce );
return MediaWiki\ResourceLoader\ResourceLoader::makeInlineScript( $script, $nonce );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
{
"type": "parser",
"about": "#0",
"skip-on": {
"mediawiki": [ ">1.42.x", "Check assertions for MW higher then 1.42." ]
},
"subject": "Test/Carousel/T.1",
"assert-output": {
"to-contain": [
Expand All @@ -60,6 +63,9 @@
{
"type": "parser",
"about": "#1",
"skip-on": {
"mediawiki": [ ">1.42.x", "Check assertions for MW higher then 1.42." ]
},
"subject": "Test/Carousel/T.2",
"assert-output": {
"to-contain": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
{
"type": "parser-html",
"about": "#0 Listwidget - alphabet - unordered",
"skip-on": {
"mediawiki": [ ">1.41.x", "Check assertions for MW higher then 1.41." ]
},
"subject": "Listwidget - alphabet - unordered",
"assert-output": {
"to-contain": [
Expand All @@ -61,6 +64,9 @@
{
"type": "parser-html",
"about": "#1 Listwidget - menu - listtype unspecified",
"skip-on": {
"mediawiki": [ ">1.41.x", "Check assertions for MW higher then 1.41." ]
},
"subject": "Listwidget - menu - listtype unspecified",
"assert-output": {
"to-contain": [
Expand All @@ -71,6 +77,9 @@
{
"type": "parser-html",
"about": "#2 Listwidget - pagination - ordered",
"skip-on": {
"mediawiki": [ ">1.41.x", "Check assertions for MW higher then 1.41." ]
},
"subject": "Listwidget - pagination - ordered",
"assert-output": {
"to-contain": [
Expand Down
6 changes: 3 additions & 3 deletions tests/phpunit/Integration/ResourcesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace SRF\Tests\Integration;

use MediaWiki\MediaWikiServices;
use ResourceLoader;
use ResourceLoaderContext;
use MediaWiki\ResourceLoader\Context;
use MediaWiki\ResourceLoader\ResourceLoader;

/**
* Tests for resource definitions and files
Expand Down Expand Up @@ -36,7 +36,7 @@ private function getSRFResourceModules() {
public function moduleDataProvider() {
$resourceLoader = MediaWikiServices::getInstance()->getResourceLoader();

$context = ResourceLoaderContext::newDummyContext();
$context = Context::newDummyContext();
$modules = $this->getSRFResourceModules();

return [ [ $modules, $resourceLoader, $context ] ];
Expand Down