Skip to content
Closed
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
29 changes: 11 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,32 @@ jobs:
strategy:
matrix:
include:
- mediawiki_version: '1.39'
- mediawiki_version: '1.43'
smw_version: dev-master
php_version: 8.1
database_type: mysql
database_image: "mariadb:10"
database_image: "mariadb:10.11"
coverage: false
experimental: false
- mediawiki_version: '1.40'
- mediawiki_version: '1.43'
smw_version: dev-master
php_version: 8.1
php_version: 8.2
database_type: mysql
database_image: "mariadb:11.2"
database_image: "mariadb:11.4"
coverage: true
experimental: false
- mediawiki_version: '1.41'
- mediawiki_version: '1.44'
smw_version: dev-master
php_version: 8.1
php_version: 8.3
database_type: mysql
database_image: "mariadb:11.2"
database_image: "mariadb:11.4"
coverage: false
experimental: false
- mediawiki_version: '1.42'
- mediawiki_version: '1.45'
smw_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
php_version: 8.1
php_version: 8.4
database_type: mysql
database_image: "mariadb:11.2"
database_image: "mariadb:11.8"
coverage: false
experimental: false

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"mediawiki/http-request": "~2.0|~1.1"
},
"require-dev": {
"mediawiki/mediawiki-codesniffer": "43.0.0",
"mediawiki/mediawiki-codesniffer": "46.0.0",
"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
4 changes: 2 additions & 2 deletions extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"license-name": "GPL-2.0-or-later",
"type": "semantic",
"requires": {
"MediaWiki": ">= 1.39",
"MediaWiki": ">= 1.43",
"extensions": {
"SemanticMediaWiki": ">= 4.2"
"SemanticMediaWiki": ">= 6.0"
}
},
"MessagesDirs": {
Expand Down
8 changes: 4 additions & 4 deletions src/ByHttpRequest/CannedResultArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __construct( DIWikiPage $resultPage, PrintRequest $printRequest,
*
* @return DIWikiPage
*/
public function getResultSubject() {
public function getResultSubject(): DIWikiPage {
return $this->mResult;
}

Expand All @@ -66,7 +66,7 @@ public function getResultSubject() {
*
* @return SMWDataItem[]|false
*/
public function getContent() {
public function getContent(): array|false {
$this->loadContent();

if ( !$this->mContent ) {
Expand All @@ -87,7 +87,7 @@ public function getContent() {
*
* @return PrintRequest
*/
public function getPrintRequest() {
public function getPrintRequest(): PrintRequest {
return $this->mPrintRequest;
}

Expand All @@ -113,7 +113,7 @@ public function getNextDataItem() {
*
* @return SMWDataItem|false
*/
public function reset() {
public function reset(): mixed {
$this->loadContent();
$result = reset( $this->mContent );

Expand Down
6 changes: 3 additions & 3 deletions src/ByHttpRequest/QueryResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function setJsonResponseParser( JsonResponseParser $jsonResponseParser )
*
* @return array
*/
public function toArray() {
public function toArray(): array {
return $this->jsonResponseParser->getRawResponseResult();
}

Expand All @@ -59,7 +59,7 @@ public function toArray() {
*
* @return array
*/
public function serializeToArray() {
public function serializeToArray(): array {
return $this->toArray();
}

Expand All @@ -68,7 +68,7 @@ public function serializeToArray() {
*
* @return CannedResultArray[]|false
*/
public function getNext() {
public function getNext(): false|array {
$page = current( $this->mResults );
next( $this->mResults );

Expand Down
4 changes: 2 additions & 2 deletions src/ByHttpRequest/ResponsePropertyList.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ private function newProperty( $value ) {
$property = DIProperty::newFromUserLabel( $value['label'] );

if ( $property->isUserDefined() ) {
return $property->setPropertyTypeId( $value['typeid'] );
return $property->setPropertyValueType( $value['typeid'] );
}

if ( $property->findPropertyTypeID() === $value['typeid'] ) {
if ( $property->findPropertyValueType() === $value['typeid'] ) {
return $property;
}

Expand Down
3 changes: 2 additions & 1 deletion src/DataValueDeserializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace SEQL;

use MediaWiki\Title\Title;
use SMW\DataModel\ContainerSemanticData;
use SMW\DataValueFactory;
use SMW\DIProperty;
Expand Down Expand Up @@ -97,7 +98,7 @@ public function newDiWikiPage( array $value ) {
$value['fulltext'] = substr( $value['fulltext'], ( $pos = strpos( $value['fulltext'], ':' ) ) !== false ? $pos + 1 : 0 );
}

$title = \Title::newFromText( $this->querySource . ':' . str_replace( " ", "_", $value['fulltext'] ), $ns );
$title = Title::newFromText( $this->querySource . ':' . str_replace( " ", "_", $value['fulltext'] ), $ns );

return DIWikiPage::newFromTitle( $title );
}
Expand Down
8 changes: 4 additions & 4 deletions tests/phpunit/Unit/DataValueDeserializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function testNewTimeValueForOutOfRangeTimestamp() {
$instance = new DataValueDeserializer( 'foo' );

$property = new DIProperty( 'Bar' );
$property->setPropertyTypeId( '_dat' );
$property->setPropertyValueType( '_dat' );

$this->assertNotEquals(
DITime::doUnserialize( '2/-200' ),
Expand All @@ -63,7 +63,7 @@ public function testNewTimeValueForRawTimeFromat() {
$instance = new DataValueDeserializer( 'foo' );

$property = new DIProperty( 'Bar' );
$property->setPropertyTypeId( '_dat' );
$property->setPropertyValueType( '_dat' );

$this->assertEquals(
DITime::doUnserialize( '2/-200' ),
Expand All @@ -75,7 +75,7 @@ public function testNewRecordValue() {
$instance = new DataValueDeserializer( 'foo' );

$property = new DIProperty( 'Foo' );
$property->setPropertyTypeId( '_rec' );
$property->setPropertyValueType( '_rec' );

$item = [
'namespace' => NS_MAIN,
Expand All @@ -98,7 +98,7 @@ public function testTextValueWithEmbeddedLink() {
$instance = new DataValueDeserializer( 'abc' );

$property = new DIProperty( 'Bar' );
$property->setPropertyTypeId( '_txt' );
$property->setPropertyValueType( '_txt' );

$dataValue = $instance->newDataValueFrom( $property, 'Foo [[42]] bar' );

Expand Down
Loading