diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a26285a..4b37e71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: include: - mediawiki_version: '1.39' smw_version: '4.2.0' + pf_version: '5.9' php_version: 8.1 database_type: mysql database_image: "mariadb:11.2" @@ -26,6 +27,7 @@ jobs: experimental: false - mediawiki_version: '1.39' smw_version: dev-master + pf_version: '5.9' php_version: 8.1 database_type: mysql database_image: "mysql:8" @@ -33,15 +35,41 @@ jobs: 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' + smw_version: dev-master + pf_version: '5.9' + php_version: 8.1 + database_type: mysql + database_image: "mariadb:11.2" + coverage: false + experimental: false + - mediawiki_version: '1.42' + smw_version: dev-master + pf_version: '5.9' + 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' + php_version: 8.1 + database_type: mysql + database_image: "mariadb:11.2" + coverage: false + experimental: false env: MW_VERSION: ${{ matrix.mediawiki_version }} SMW_VERSION: ${{ matrix.smw_version }} + PF_VERSION: ${{ matrix.pf_version }} PHP_VERSION: ${{ matrix.php_version }} DB_TYPE: ${{ matrix.database_type }} DB_IMAGE: ${{ matrix.database_image }} diff --git a/Makefile b/Makefile index 840574b..b540b76 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ DB_IMAGE?="" # extensions SMW_VERSION?=4.2.0 -PF_VERSION?=5.5.1 +PF_VERSION?=5.9 # composer # Enables "composer update" inside of extension diff --git a/composer.json b/composer.json index 9149402..75c8626 100644 --- a/composer.json +++ b/composer.json @@ -40,10 +40,13 @@ "php": ">=7.4", "composer/installers": "1.*,>=1.0.1", "mediawiki/semantic-media-wiki": "~4.0|~5.0", - "mediawiki/page-forms": ">=5.3.0" + "mediawiki/page-forms": ">=5.9.0" }, "require-dev": { - "mediawiki/semantic-media-wiki": "@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" }, "extra": { "branch-alias": { @@ -60,11 +63,14 @@ }, "scripts":{ "test": [ + "@lint", + "minus-x check .", "@phpunit" ], "test-coverage": [ "@phpunit-coverage" ], + "lint": "parallel-lint . --exclude vendor --exclude node_modules", "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" } diff --git a/tests/phpunit/Unit/ApiSemanticFormsSelectRequestProcessorTest.php b/tests/phpunit/Unit/ApiSemanticFormsSelectRequestProcessorTest.php index a556a2c..67753c2 100644 --- a/tests/phpunit/Unit/ApiSemanticFormsSelectRequestProcessorTest.php +++ b/tests/phpunit/Unit/ApiSemanticFormsSelectRequestProcessorTest.php @@ -18,7 +18,7 @@ * @author FelixAba */ class ApiSemanticFormsSelectRequestProcessorTest - extends \PHPUnit_Framework_TestCase { + extends \PHPUnit\Framework\TestCase { private $ApiSFSRP; diff --git a/tests/phpunit/Unit/ApiSemanticFormsSelectTest.php b/tests/phpunit/Unit/ApiSemanticFormsSelectTest.php index f3e0b01..5c76e31 100644 --- a/tests/phpunit/Unit/ApiSemanticFormsSelectTest.php +++ b/tests/phpunit/Unit/ApiSemanticFormsSelectTest.php @@ -17,7 +17,7 @@ * * @author mwjames */ -class ApiSemanticFormsSelectTest extends \PHPUnit_Framework_TestCase { +class ApiSemanticFormsSelectTest extends \PHPUnit\Framework\TestCase { private $ApiSFS; private $ApiMain; diff --git a/tests/phpunit/Unit/OutputTest.php b/tests/phpunit/Unit/OutputTest.php index b70eb31..3ba9741 100644 --- a/tests/phpunit/Unit/OutputTest.php +++ b/tests/phpunit/Unit/OutputTest.php @@ -13,7 +13,7 @@ * * @author mwjames */ -class OutputTest extends \PHPUnit_Framework_TestCase { +class OutputTest extends \PHPUnit\Framework\TestCase { private $data; protected function setUp(): void { diff --git a/tests/phpunit/Unit/SelectFieldTest.php b/tests/phpunit/Unit/SelectFieldTest.php index 418b88e..8b35624 100644 --- a/tests/phpunit/Unit/SelectFieldTest.php +++ b/tests/phpunit/Unit/SelectFieldTest.php @@ -20,7 +20,7 @@ * @group semantic-forms-select * @author FelixAba */ -class SelectFieldTest extends \PHPUnit_Framework_TestCase { +class SelectFieldTest extends \PHPUnit\Framework\TestCase { private $selectField; private $other_args_query_parametrized = [ 'query' => '((Category:Building Complex))((Part Of Site::@@@@));?Display Title;format~list;sort~Display Title;sep~,;link~none;headers~hide;limit~500' ]; diff --git a/tests/phpunit/Unit/SemanticFormsSelectInputTest.php b/tests/phpunit/Unit/SemanticFormsSelectInputTest.php index cb3a35b..071adc4 100644 --- a/tests/phpunit/Unit/SemanticFormsSelectInputTest.php +++ b/tests/phpunit/Unit/SemanticFormsSelectInputTest.php @@ -13,7 +13,7 @@ * * @author FelixAba */ -class SemanticFormsSelectInputTest extends \PHPUnit_Framework_TestCase { +class SemanticFormsSelectInputTest extends \PHPUnit\Framework\TestCase { private $SFSInput;