diff --git a/Makefile b/Makefile index 71d8823..437bc8d 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ EXTENSION := SemanticExtraSpecialProperties MW_VERSION ?= 1.35 SMW_VERSION ?= 4.1.1 -AR_VERSION ?= 1.8.1 +AR_VERSION ?= 1.8.2 IMAGE_VERSION := $(MW_VERSION)-$(SMW_VERSION)-$(AR_VERSION) BUILD_ARGS := \ @@ -57,7 +57,7 @@ show-logs: .init .PHONY: .build .build: $(show-current-target) - $(compose) build $(BUILD_ARGS) wiki + $(compose) build $(BUILD_ARGS) wiki .PHONY: .up .up: diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 8ab5af5..34ff85f 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -4,6 +4,7 @@ This file contains the RELEASE-NOTES of the **Semantic Extra Special Properties* Unreleased. +* replace deprecated `SMWStore::updateDataBefore` hook with `SMW::Store::BeforeDataUpdateComplete` (gesinn-it-gea) * added handler for ApprovedRevsRevisionApproved and ApprovedRevsRevisionUnapproved to update the cache (gesinn-it-gea) * SMW's ApplicationFactory has been renamed to ServicesFactory (gesinn-it-gea) * Remove "Approved date" property when unapproving (gesinn-it-wam) diff --git a/src/HookRegistry.php b/src/HookRegistry.php index b30cbdc..d2eba64 100644 --- a/src/HookRegistry.php +++ b/src/HookRegistry.php @@ -167,9 +167,9 @@ private function registerCallbackHandlers( $config ) { }; /** - * @see https://www.semantic-mediawiki.org/wiki/Hooks/SMWStore::updateDataBefore + * @see https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/docs/technical/hooks/hook.store.beforedataupdatecomplete.md */ - $this->handlers['SMWStore::updateDataBefore'] = function ( $store, $semanticData ) use ( $appFactory ) { + $this->handlers['SMW::Store::BeforeDataUpdateComplete'] = function ( $store, $semanticData ) use ( $appFactory ) { $extraPropertyAnnotator = new ExtraPropertyAnnotator( $appFactory @@ -215,8 +215,6 @@ private function registerCallbackHandlers( $config ) { return true; }; - - // 'ApprovedRevsFileRevisionApproved' => [ $this, 'onApprovedRevsFileRevisionApproved' ], } } diff --git a/tests/phpunit/Unit/HookRegistryTest.php b/tests/phpunit/Unit/HookRegistryTest.php index 488f045..27dc471 100644 --- a/tests/phpunit/Unit/HookRegistryTest.php +++ b/tests/phpunit/Unit/HookRegistryTest.php @@ -69,7 +69,7 @@ public function testInitExtension() { '___NREV', '___NTREV', '___USEREDITCNT', - '___USEREDITCNTNS', + '___USEREDITCNTNS', '___EXIFDATA', '___NSID', '___NSNAME' @@ -122,7 +122,7 @@ public function doTestRegisteredAddCustomFixedPropertyTables( $instance ) { public function doTestRegisteredUpdateDataBeforeHandler( $instance ) { $this->assertTrue( - $instance->isRegistered( 'SMWStore::updateDataBefore' ) + $instance->isRegistered( 'SMW::Store::BeforeDataUpdateComplete' ) ); $store = $this->getMockBuilder( '\SMW\Store' ) @@ -134,7 +134,7 @@ public function doTestRegisteredUpdateDataBeforeHandler( $instance ) { ->getMock(); $this->assertThatHookIsExcutable( - $instance->getHandlers( 'SMWStore::updateDataBefore' ), + $instance->getHandlers( 'SMW::Store::BeforeDataUpdateComplete' ), [ $store, $semanticData ] ); }