From 47386b68a771eab711fb2c01fd4dbbfc1faf4314 Mon Sep 17 00:00:00 2001 From: thomas-topway-it Date: Mon, 21 Jul 2025 14:28:06 +0400 Subject: [PATCH 1/5] update libraries --- composer.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 623e501..2e0d9d9 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,10 @@ "name": "James Hong Kong", "homepage": "https://www.semantic-mediawiki.org/wiki/User:MWJames", "role": "Developer" + }, + { + "name": "thomas-topway-it", + "homepage": "https://www.mediawiki.org/wiki/User:Thomas-topway-it" } ], "support": { @@ -29,9 +33,15 @@ "require": { "php": ">=8.1", "composer/installers": ">=1.0.1", - "easyrdf/easyrdf": "~1.1", - "ml/json-ld": "^1.2" + "sweetrdf/easyrdf": "~1.1", + "ml/json-ld": "dev-php8#f87ba28e38f0bd14edf338fa5cf5529e6ed99cf8 as 1.3" }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/lanthaler/JsonLD" + } + ], "require-dev": { "mediawiki/mediawiki-codesniffer": "43.0.0", "mediawiki/minus-x": "1.1.3", From 7dbde8f080a30b154c2d060a4bdb3692d90670d6 Mon Sep 17 00:00:00 2001 From: thomas-topway-it Date: Mon, 21 Jul 2025 14:28:53 +0400 Subject: [PATCH 2/5] update version --- extension.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension.json b/extension.json index 9bb3ecc..f77982e 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "SemanticMetaTags", - "version": "4.0.0-beta", + "version": "4.1.0", "author": [ "James Hong Kong" ], From a0045c47f3e356d4947a082e648a9382119d94bc Mon Sep 17 00:00:00 2001 From: thomas-topway-it Date: Tue, 30 Sep 2025 16:40:15 +0400 Subject: [PATCH 3/5] replace at matcher --- tests/phpunit/Unit/LazySemanticDataLookupTest.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/phpunit/Unit/LazySemanticDataLookupTest.php b/tests/phpunit/Unit/LazySemanticDataLookupTest.php index 18f3d3e..8da2eb5 100644 --- a/tests/phpunit/Unit/LazySemanticDataLookupTest.php +++ b/tests/phpunit/Unit/LazySemanticDataLookupTest.php @@ -67,13 +67,8 @@ public function testGetSemanticDataFromStore() { ->disableOriginalConstructor() ->getMock(); - $semanticData->expects( $this->at( 0 ) ) - ->method( 'isEmpty' ) - ->willReturn( true ); - - $semanticData->expects( $this->at( 1 ) ) - ->method( 'isEmpty' ) - ->willReturn( false ); + $semanticData->method( 'isEmpty' ) + ->willReturnOnConsecutiveCalls( true, false ); $semanticData->expects( $this->once() ) ->method( 'getSubject' ) From 1e4408292f3bf3f2f14c7da70b887810a545ef55 Mon Sep 17 00:00:00 2001 From: thomas-topway-it Date: Tue, 30 Sep 2025 16:42:44 +0400 Subject: [PATCH 4/5] replace at matcher --- .../PropertyValuesContentAggregatorTest.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/phpunit/Unit/PropertyValuesContentAggregatorTest.php b/tests/phpunit/Unit/PropertyValuesContentAggregatorTest.php index 64104e0..3b16b73 100644 --- a/tests/phpunit/Unit/PropertyValuesContentAggregatorTest.php +++ b/tests/phpunit/Unit/PropertyValuesContentAggregatorTest.php @@ -173,15 +173,15 @@ public function testFindContentForMultiplePropertiesToUseFullContentAggregation( ->disableOriginalConstructor() ->getMock(); - $semanticData->expects( $this->at( 0 ) ) - ->method( 'getPropertyValues' ) - ->with( DIProperty::newFromUserLabel( 'foo' ) ) - ->willReturn( $propertyValues[0] ); - - $semanticData->expects( $this->at( 2 ) ) - ->method( 'getPropertyValues' ) - ->with( DIProperty::newFromUserLabel( 'bar' ) ) - ->willReturn( $propertyValues[2] ); + $semanticData->method('getPropertyValues') + ->withConsecutive( + [ DIProperty::newFromUserLabel('foo') ], + [ DIProperty::newFromUserLabel('bar') ] + ) + ->willReturnOnConsecutiveCalls( + $propertyValues[0], + $propertyValues[2] + ); $semanticData->expects( $this->any() ) ->method( 'getSubSemanticData' ) From 139ca971eb040386b2e61f5b99e57338a62a1b86 Mon Sep 17 00:00:00 2001 From: thomas-topway-it Date: Tue, 30 Sep 2025 16:48:17 +0400 Subject: [PATCH 5/5] fix phpcs --- tests/phpunit/Unit/PropertyValuesContentAggregatorTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/Unit/PropertyValuesContentAggregatorTest.php b/tests/phpunit/Unit/PropertyValuesContentAggregatorTest.php index 3b16b73..549a3e8 100644 --- a/tests/phpunit/Unit/PropertyValuesContentAggregatorTest.php +++ b/tests/phpunit/Unit/PropertyValuesContentAggregatorTest.php @@ -173,10 +173,10 @@ public function testFindContentForMultiplePropertiesToUseFullContentAggregation( ->disableOriginalConstructor() ->getMock(); - $semanticData->method('getPropertyValues') + $semanticData->method( 'getPropertyValues' ) ->withConsecutive( - [ DIProperty::newFromUserLabel('foo') ], - [ DIProperty::newFromUserLabel('bar') ] + [ DIProperty::newFromUserLabel( 'foo' ) ], + [ DIProperty::newFromUserLabel( 'bar' ) ] ) ->willReturnOnConsecutiveCalls( $propertyValues[0],