Skip to content

Commit

Permalink
Merge pull request #44 - prepare 3.0.0
Browse files Browse the repository at this point in the history
- update CI
- drop support for MW 1.35, add for MW 1.40+
  • Loading branch information
gesinn-it-ilm authored Dec 16, 2024
1 parent 39b1e89 commit 896308c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 28 deletions.
29 changes: 9 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,30 @@ jobs:
strategy:
matrix:
include:
- mediawiki_version: 1.35
php_version: 7.4
database_type: mysql
database_image: "mysql:5.7"
coverage: true
experimental: false
- mediawiki_version: 1.35
php_version: 7.4
database_type: sqlite
coverage: false
experimental: false
- mediawiki_version: 1.39
- mediawiki_version: '1.39'
php_version: 8.1
database_type: mysql
database_image: "mysql:8"
coverage: false
experimental: false
- mediawiki_version: 1.39
- mediawiki_version: '1.39'
php_version: 8.1
database_type: mysql
database_image: "mariadb:10"
coverage: false
experimental: false
- mediawiki_version: 1.43
- mediawiki_version: '1.40'
php_version: 8.1
database_type: mysql
database_image: "mariadb:11.2"
coverage: true
experimental: false
- mediawiki_version: '1.43'
php_version: 8.2
database_type: mysql
database_image: "mariadb:11.2"
coverage: false
experimental: false
# - mediawiki_version: 1.39
# php_version: 8.1
# database_type: postgres
# database_image: "postgres:14"
# coverage: false
# experimental: true
env:
MW_VERSION: ${{ matrix.mediawiki_version }}
PHP_VERSION: ${{ matrix.php_version }}
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ endif
EXTENSION=IDProvider

# docker images
MW_VERSION?=1.35
PHP_VERSION?=7.4
DB_TYPE?=sqlite
DB_IMAGE?=""
MW_VERSION?=1.39
PHP_VERSION?=8.1
DB_TYPE?=mysql
DB_IMAGE?="mysql:8"

# extensions

Expand Down
4 changes: 2 additions & 2 deletions extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "IDProvider",
"version": "2.0.3",
"version": "3.0.0-alpha1",
"author": [
"Simon Heimler",
"Alexander Gesinn (gesinn.it GmbH & Co. KG)",
Expand All @@ -11,7 +11,7 @@
"license-name": "MIT",
"type": "other",
"requires": {
"MediaWiki": ">= 1.31"
"MediaWiki": ">= 1.39"
},
"AutoloadNamespaces": {
"MediaWiki\\Extension\\IdProvider\\": "src/"
Expand Down
5 changes: 4 additions & 1 deletion tests/phpunit/Unit/Api/IncrementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
class IncrementTest extends TestCase {

public function testGetExamples() {
$increment = new Increment( new ApiMain(), null );
// Handle module name based on MediaWiki version
$moduleName = version_compare( MW_VERSION, '1.40', '>=' ) ? 'idprovider-increment' : null;

$increment = new Increment( new ApiMain(), $moduleName );
$messages = $increment->getExamplesMessages();
$this->assertCount( 2, $messages );
}
Expand Down
5 changes: 4 additions & 1 deletion tests/phpunit/Unit/Api/RandomTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
class RandomTest extends TestCase {

public function testGetExamples() {
$random = new Random( new ApiMain(), null );
// Handle module name based on MediaWiki version
$moduleName = version_compare( MW_VERSION, '1.40', '>=' ) ? 'idprovider-random' : null;

$random = new Random( new ApiMain(), $moduleName );
$messages = $random->getExamplesMessages();
$this->assertCount( 2, $messages );
}
Expand Down

0 comments on commit 896308c

Please sign in to comment.