Skip to content
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
4 changes: 2 additions & 2 deletions .env-39
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MW_VERSION?=1.39
MW_VERSION?=1.43
PHP_VERSION?=8.1
DB_TYPE?=mysql
DB_IMAGE?="mariadb:latest"
DB_IMAGE?="mariadb:latest"
File renamed without changes.
44 changes: 14 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,52 +17,36 @@ jobs:
strategy:
matrix:
include:
- mediawiki_version: '1.39'
smw_version: '4.2.0'
pf_version: '5.9'
- mediawiki_version: '1.43'
smw_version: '6.0.1'
pf_version: '6.0'
php_version: 8.1
database_type: mysql
database_image: "mariadb:11.2"
coverage: false
experimental: false
- mediawiki_version: '1.39'
smw_version: dev-master
pf_version: '5.9'
- mediawiki_version: '1.43'
smw_version: '6.0.1'
pf_version: '6.0'
php_version: 8.1
database_type: mysql
database_image: "mysql:8"
coverage: false
experimental: false
- mediawiki_version: '1.40'
smw_version: '4.2.0'
pf_version: '5.9'
php_version: 8.1
database_type: mysql
database_image: "mariadb:11.2"
coverage: true
experimental: false
- mediawiki_version: '1.41'
- mediawiki_version: '1.44'
smw_version: dev-master
pf_version: '5.9'
php_version: 8.1
pf_version: '6.0'
php_version: 8.2
database_type: mysql
database_image: "mariadb:11.2"
database_image: "mariadb:11.8"
coverage: false
experimental: false
- mediawiki_version: '1.42'
- mediawiki_version: '1.45'
smw_version: dev-master
pf_version: '5.9'
php_version: 8.1
pf_version: '6.0'
php_version: 8.3
database_type: mysql
database_image: "mariadb:11.2"
coverage: false
experimental: false
- mediawiki_version: '1.43'
smw_version: dev-master
pf_version: '5.9'
php_version: 8.1
database_type: mysql
database_image: "mariadb:11.2"
database_image: "mariadb:11.8"
coverage: false
experimental: false

Expand Down
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ endif
EXTENSION := SemanticFormsSelect

# docker images
MW_VERSION?=1.39
MW_VERSION?=1.43
PHP_VERSION?=8.1
DB_TYPE?=sqlite
DB_IMAGE?=""
DB_TYPE?=mysql
DB_IMAGE?="mariadb:11.2"

# extensions
SMW_VERSION?=dev-master
PF_VERSION?=5.9
SMW_VERSION?=6.0.1
PF_VERSION?=6.0

# composer
# Enables "composer update" inside of extension
Expand All @@ -30,4 +30,3 @@ NODE_JS?=true

# check for build dir and git submodule init if it does not exist
include build/Makefile

7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@
}
],
"require": {
"php": ">=7.4",
"php": ">=8.1",
"composer/installers": ">=1.0.1"
},
"require-dev": {
"mediawiki/semantic-media-wiki": "@dev",
"mediawiki/minus-x": "1.1.3",
"php-parallel-lint/php-console-highlighter": "1.0.0",
"php-parallel-lint/php-parallel-lint": "1.4.0"
Expand Down Expand Up @@ -72,8 +71,8 @@
"@phpunit-coverage"
],
"lint": "parallel-lint . --exclude vendor --exclude node_modules --exclude extensions",
"phpunit": "php ../../tests/phpunit/phpunit.php -c phpunit.xml.dist",
"phpunit-coverage": "php ../../tests/phpunit/phpunit.php -c phpunit.xml.dist --testdox --coverage-text --coverage-html coverage/php --coverage-clover coverage/php/coverage.xml",
"phpunit": "php ${MW_INSTALL_PATH:-../..}/tests/phpunit/phpunit.php -c phpunit.xml.dist",
"phpunit-coverage": "php ${MW_INSTALL_PATH:-../..}/tests/phpunit/phpunit.php -c phpunit.xml.dist --testdox --coverage-text --coverage-clover coverage/php/coverage.xml",
"post-test-coverage": [
"sed -i 's|/var/www/html/extensions/SemanticFormsSelect/||g' coverage/php/coverage.xml",
"find coverage/php -type f -name '*.html' -exec sed -i 's|/var/www/html/extensions/||g' {} +"
Expand Down
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"license-name": "GPL-2.0-or-later",
"type": "semantic",
"requires": {
"MediaWiki": ">= 1.39"
"MediaWiki": ">= 1.43"
},
"AutoloadClasses": {
"SFS\\Hooks": "SemanticFormsSelect.hooks.php",
Expand Down
2 changes: 1 addition & 1 deletion src/ApiSemanticFormsSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

use ApiBase;
use MediaWiki\MediaWikiServices;
use MediaWiki\Title\Title;
use Parser;
use ParserOptions;
use ParserOutput;
use Title;

class ApiSemanticFormsSelect extends ApiBase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace SFS\Tests;

use MediaWiki\Api\ApiMain;
use MediaWiki\Context\RequestContext;
use MediaWiki\Request\WebRequest;
use MediaWiki\Request\FauxRequest;
use SFS\ApiSemanticFormsSelectRequestProcessor;
use ApiMain;
use RequestContext;
use WebRequest;
use FauxRequest;

/**
* @covers \SFS\ApiSemanticFormsSelectRequestProcessor
Expand Down
8 changes: 4 additions & 4 deletions tests/phpunit/Unit/ApiSemanticFormsSelectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace SFS\Tests;

use MediaWiki\Api\ApiMain;
use MediaWiki\Context\RequestContext;
use MediaWiki\Request\WebRequest;
use MediaWiki\Request\FauxRequest;
use SFS\ApiSemanticFormsSelect;
use ApiMain;
use RequestContext;
use WebRequest;
use FauxRequest;

/**
* @covers \SFS\ApiSemanticFormsSelect
Expand Down
14 changes: 3 additions & 11 deletions tests/phpunit/Unit/SelectFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
namespace SFS\Tests;

use MediaWiki\MediaWikiServices;
use MediaWiki\Title\Title;
use Parser;
use SFS\SelectField;

use ParserOptions;
use Title;
use SFS\SelectField;

/**
* @covers \SFS\SelectField
Expand Down Expand Up @@ -256,13 +255,7 @@ protected function setUp(): void {
$name = $user->getName();
$parserOption;

if ( version_compare( MW_VERSION, '1.39', '>=' ) ) {
//check if version is higher than 1.39, or the same (the getOption() function within ParserOptions is different then in MW 1.35)
$parserOption = new ParserOptions( $user );
} else {
//if MW version is lower than 1.39
$parserOption = new ParserOptions( $name );
}
$parserOption = new ParserOptions( $user );
$parser = MediaWikiServices::getInstance()->getParser();
$parser->setOutputType(Parser::OT_HTML);
$parser->setTitle( Title::newFromText( 'NO TITLE' ) );
Expand All @@ -277,5 +270,4 @@ protected function tearDown(): void {
parent::tearDown();
}


}
Loading