diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b44e320..be8d58d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -7,18 +7,35 @@ on:
jobs:
test:
name: "PHPUnit: MW ${{ matrix.mw }}, PHP ${{ matrix.php }}"
+ continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
include:
- mw: 'REL1_36'
php: 8.0
+ experimental: false
- mw: 'REL1_37'
php: 8.0
+ experimental: false
- mw: 'REL1_38'
php: 8.0
+ experimental: false
- mw: 'REL1_39'
php: 8.0
+ experimental: false
+ - mw: 'REL1_41'
+ php: 8.1
+ experimental: false
+ - mw: 'REL1_42'
+ php: 8.2
+ experimental: false
+ - mw: 'REL1_43'
+ php: 8.3
+ experimental: false
+ - mw: 'master'
+ php: 8.4
+ experimental: true
runs-on: ubuntu-latest
diff --git a/README.md b/README.md
index 50c79bc..002934b 100644
--- a/README.md
+++ b/README.md
@@ -186,9 +186,9 @@ Rules are applied in order. In other words, the second Rule can override values
Platform requirements:
-* [PHP] 7.4 or later (tested up to 8.0)
-* [MediaWiki] 1.35 or later (tested up to 1.37)
-* [Wikibase] 1.35 or later (tested up to 1.37)
+* [PHP] 7.4 or later (tested up to 8.3)
+* [MediaWiki] 1.35 or later (tested up to 1.43)
+* [Wikibase] 1.35 or later (tested up to 1.43)
The recommended way to install Automated Values is using [Composer] with
[MediaWiki's built-in support for Composer][Composer install].
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 64d3101..9f73bc4 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -6,9 +6,6 @@
tests/Integration
-
- tests/TestExampleRules.php
-
tests/MediaWiki
diff --git a/src/DataAccess/PageContentFetcher.php b/src/DataAccess/PageContentFetcher.php
index 95d12c0..73e00a8 100644
--- a/src/DataAccess/PageContentFetcher.php
+++ b/src/DataAccess/PageContentFetcher.php
@@ -19,8 +19,7 @@ public function __construct( \TitleParser $titleParser, RevisionLookup $revision
public function getPageContent( string $pageTitle ): ?\Content {
try {
$title = $this->titleParser->parseTitle( $pageTitle );
- }
- catch ( \MalformedTitleException $e ) {
+ } catch ( \MalformedTitleException $e ) {
return null;
}
diff --git a/src/DataAccess/RulesDeserializer.php b/src/DataAccess/RulesDeserializer.php
index f2269ec..d2e33b9 100644
--- a/src/DataAccess/RulesDeserializer.php
+++ b/src/DataAccess/RulesDeserializer.php
@@ -61,7 +61,7 @@ private function newRules( array $arrayRules ): Rules {
private function newEntityCriteria( array $arrayRule ): EntityCriteria {
return new EntityCriteria(
...array_map(
- fn( array $criterion ) => new StatementEqualityCriterion( Compat::newPId( $criterion['statement'] ), new StringValue( $criterion['equalTo'] ) ),
+ fn ( array $criterion ) => new StatementEqualityCriterion( Compat::newPId( $criterion['statement'] ), new StringValue( $criterion['equalTo'] ) ),
$arrayRule['when'] ?? []
)
);
diff --git a/src/Domain/Template.php b/src/Domain/Template.php
index 273ad0c..ab51087 100644
--- a/src/Domain/Template.php
+++ b/src/Domain/Template.php
@@ -41,7 +41,7 @@ public function buildValues( StatementList $statements ): array {
public function supportsMultipleValues(): bool {
return count( array_unique(
array_map(
- fn( TemplateSegment $s ) => $s->statementPropertyId,
+ fn ( TemplateSegment $s ) => $s->statementPropertyId,
$this->segments
)
) ) === 1;
@@ -57,7 +57,7 @@ private function buildMultipleValues( StatementList $statements ): array {
$values[] = $this->buildValue( new StatementList( $statement ) );
}
- return array_filter( $values, fn( string $s ) => $s !== '' );
+ return array_filter( $values, fn ( string $s ) => $s !== '' );
}
}
diff --git a/src/Domain/TemplateSegment.php b/src/Domain/TemplateSegment.php
index f8e9d0f..99ef1f7 100644
--- a/src/Domain/TemplateSegment.php
+++ b/src/Domain/TemplateSegment.php
@@ -51,7 +51,7 @@ private function getValuesForSegment( StatementList $statements ): array {
$values[] = $this->getValueFromSegment( $statement );
}
- return array_filter( $values, fn( $v ) => $v !== null );
+ return array_filter( $values, fn ( $v ) => $v !== null );
}
private function getValueFromSegment( Statement $statement ): ?DataValue {
diff --git a/src/Hooks.php b/src/Hooks.php
index 2258fbf..047c677 100644
--- a/src/Hooks.php
+++ b/src/Hooks.php
@@ -18,15 +18,13 @@ class Hooks {
public static function onMultiContentSave( RenderedRevision $renderedRevision ): void {
try {
$content = $renderedRevision->getRevision()->getSlot( 'main' )->getContent();
- }
- catch ( RevisionAccessException $ex ) {
+ } catch ( RevisionAccessException $ex ) {
}
if ( isset( $content ) && $content instanceof EntityContent ) {
try {
$entity = $content->getEntity();
- }
- catch ( \Exception $ex ) {
+ } catch ( \Exception $ex ) {
}
if ( isset( $entity ) && $entity instanceof StatementListProvidingEntity ) {
diff --git a/tests/MediaWiki/AutomatedValuesMwTestCase.php b/tests/MediaWiki/AutomatedValuesMwTestCase.php
index dbc9fb8..f04dbbc 100644
--- a/tests/MediaWiki/AutomatedValuesMwTestCase.php
+++ b/tests/MediaWiki/AutomatedValuesMwTestCase.php
@@ -20,7 +20,7 @@ protected function privateSaveAndLoadProperty( Property $property ): Property {
private function saveProperty( Property $property ) {
$this->insertPage(
- 'Property:' . $property->getId()->serialize(),
+ 'Property:' . $property->getId()->getSerialization(),
json_encode( $this->getPropertySerializer()->serialize( $property ) )
);
}