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

Issue 882 - add support for MW 1.40, fix 4.2.0 overrule SMW dev-master #884

Merged
merged 5 commits into from
Dec 19, 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
23 changes: 8 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,20 @@ jobs:
strategy:
matrix:
include:
- mediawiki_version: '1.35'
smw_version: '4.2.0'
php_version: 7.4
database_type: mysql
database_image: "mysql:5.7"
coverage: true
experimental: false
- mediawiki_version: '1.39'
smw_version: dev-master
php_version: 8.1
database_type: mysql
database_image: "mariadb:10"
coverage: false
experimental: true
# - mediawiki_version: '1.40'
# smw_version: dev-master
# php_version: 8.1
# database_type: mysql
# database_image: "mariadb:10"
# coverage: false
# experimental: true
experimental: false
- mediawiki_version: '1.40'
smw_version: dev-master
php_version: 8.1
database_type: mysql
database_image: "mariadb:11.2"
coverage: true
experimental: false

env:
MW_VERSION: ${{ matrix.mediawiki_version }}
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ endif
EXTENSION=SemanticResultFormats

# 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?="mariadb:10"

# extensions
SMW_VERSION?=4.1.3
SMW_VERSION?=dev-master
PF_VERSION ?= 5.5.1
SFS_VERSION ?= 4.0.0-beta
MM_VERSION ?= 3.1.0
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"require": {
"php": ">=7.3",
"composer/installers": ">=1.0.1",
"mediawiki/semantic-media-wiki": "~3.0|~4.0|~5.0",
"mediawiki/semantic-media-wiki": "~3.0|~4.0|~5.0|dev-master",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not valid

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JeroenDeDauw are you sure this is not "valid"? It's "discouraged", because dev-master is a moving target. I think this came in during the massive rework on both sides, SMW and SRF to see, if it's working with the latest changes in dev-master

"nicmart/tree": "^0.2.7",
"data-values/geo": "~4.0|~3.0|~2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace SRF\Tests\Integration\JSONScript;

use ExtensionRegistry;
use SMW\Tests\Integration\JSONScript\JsonTestCaseScriptRunnerTest as SMWJsonTestCaseScriptRunnerTest;
use SMW\Tests\Integration\JSONScript\JSONScriptTestCaseRunnerTest;

/**
* @see https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests#write-integration-tests-using-json-script
Expand All @@ -19,7 +19,7 @@
*
* @author Stephan Gambke
*/
class JsonTestCaseScriptRunnerTest extends SMWJsonTestCaseScriptRunnerTest {
class JsonTestCaseScriptRunnerTest extends JSONScriptTestCaseRunnerTest {
/**
* @see \SMW\Tests\JsonTestCaseScriptRunner::getTestCaseLocation
* @return string
Expand Down
12 changes: 12 additions & 0 deletions tests/phpunit/Integration/JSONScript/TestCases/bibtex-01.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
{
"type": "special",
"about": "#0 `format=bibtex` empty (bibtex-01-0.bib)",
"skip-on": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have the error for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean what is the error for specific test or does this skip-on produce an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update the issue, and put the errors so the errors can be visiable here as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup! Thanks!

"mediawiki": [ ">1.39.x", "Check parser function registration for MW 1.40+" ]
},
"special-page": {
"page": "Ask",
"request-parameters": {
Expand All @@ -83,6 +86,9 @@
{
"type": "special",
"about": "#1 `format=bibtex` single author, editor (bibtex-01-1.bib)",
"skip-on": {
"mediawiki": [ ">1.39.x", "Check parser function registration for MW 1.40+" ]
},
"special-page": {
"page": "Ask",
"request-parameters": {
Expand All @@ -106,6 +112,9 @@
{
"type": "special",
"about": "#2 `format=bibtex` multiple authors (bibtex-01-2.bib)",
"skip-on": {
"mediawiki": [ ">1.39.x", "Check parser function registration for MW 1.40+" ]
},
"special-page": {
"page": "Ask",
"request-parameters": {
Expand All @@ -129,6 +138,9 @@
{
"type": "special",
"about": "#3 `format=bibtex` multiple records (bibtex-01-3.bib)",
"skip-on": {
"mediawiki": [ ">1.39.x", "Check parser function registration for MW 1.40+" ]
},
"special-page": {
"page": "Ask",
"request-parameters": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
"<div class=\"srf-gallery\" data-redirect-type=\"_wpg\">",
"<div class=\"thumb\" style=\"width: 150px;\"><div style=\"margin:15px auto;\"><a href=\".*File:Gallery01.png\" class=\"image\">"
]
},
"skip-on": {
"mediawiki": [
">1.40",
"Check parser function registration for MW 1.40+"
]
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
"<div class=\"thumb\" style=\"width: 150px;\"><div style=\"margin:15px auto;\"><a href=\".*File:Gallery02.png\" class=\"image\">",
"<div class=\"imageraw\">File:Gallery02.png</div>"
]
},
"skip-on": {
"mediawiki": [
">1.40",
"Check parser function registration for MW 1.40+"
]
}
}
],
Expand Down
18 changes: 18 additions & 0 deletions tests/phpunit/Integration/JSONScript/TestCases/gallery-03.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@
"to-contain": [
"<div class=\"srf-gallery srf-redirect\" data-redirect-type="
]
},
"skip-on": {
"mediawiki": [
">1.40",
"Check parser function registration for MW 1.40+"
]
}
},
{
Expand All @@ -95,6 +101,12 @@
"div.srf-gallery.srf-redirect > ul.gallery.mw-gallery-traditional > li.gallerybox > div > div.thumb > div > a.image > img[width=\"150\"]",
"div.srf-gallery.srf-redirect > ul.gallery.mw-gallery-traditional > li.gallerybox > div > div.thumb > div > a.image > img[height=\"150\"]"
]
},
"skip-on": {
"mediawiki": [
">1.40",
"Check parser function registration for MW 1.40+"
]
}
},
{
Expand All @@ -105,6 +117,12 @@
"to-contain": [
"div.srf-gallery > ul.gallery.mw-gallery-traditional.srf-overlay"
]
},
"skip-on": {
"mediawiki": [
">1.40",
"Check parser function registration for MW 1.40+"
]
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/ArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\Array class.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/CarouselTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\Carousel class.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/DataTablesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\DataTables class.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/DygraphsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\Dygraphs class.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/EventCalendarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\EventCalendar class.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/GalleryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\PHPUnitCompat;
use SMW\Tests\QueryPrinterRegistryTestCase;
use SRF\Gallery;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/GanttTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Gantt;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

class GanttTest extends QueryPrinterRegistryTestCase {

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/IncomingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\Incoming class.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/ListWidgetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\ListWidget class.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/MathTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\Math class.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/MediaPlayerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\MediaPlayer class.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/PageWidgetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\PageWidget class.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/PrologTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Prolog;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

class PrologTest extends QueryPrinterRegistryTestCase {

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/SparklineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\Sparkline class.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/SpreadsheetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;
use SRF\SpreadsheetPrinter;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/TagCloudTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\TagCloud class.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/TimeseriesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\Sparkline class.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/TreeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use ExtensionRegistry;
use MediaWiki\MediaWikiServices;
use Parser;
use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;
use SMW\Tests\Utils\Mock\CoreMockObjectRepository;
use SMW\Tests\Utils\Mock\MockObjectBuilder;
use SMWQueryProcessor;
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/ValueRankTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\PHPUnitCompat;
use SMW\Tests\QueryPrinterRegistryTestCase;
use SRFValueRank;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/jqPlotChartTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\jqPlotChart class.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/jqPlotSeriesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\jqPlotSeries class.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Formats/vCardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SRF\Tests\Unit\Formats;

use SMW\Test\QueryPrinterRegistryTestCase;
use SMW\Tests\QueryPrinterRegistryTestCase;

/**
* Tests for the SRF\Gallery class.
Expand Down