replace deprecated `SMWStore::updateDataBefore` hook with `SMW::Store::BeforeDataUpdateComplete`, CI: AR 1.8.1 → 1.8.2

这个提交包含在:
gesinn-it-gea 2023-04-06 13:56:10 +02:00
父节点 bd39624297
当前提交 7dda5fdd1d
共有 4 个文件被更改,包括 8 次插入9 次删除

查看文件

@ -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:

查看文件

@ -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)

查看文件

@ -167,9 +167,9 @@ class HookRegistry {
};
/**
* @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 @@ class HookRegistry {
return true;
};
// 'ApprovedRevsFileRevisionApproved' => [ $this, 'onApprovedRevsFileRevisionApproved' ],
}
}

查看文件

@ -69,7 +69,7 @@ class HookRegistryTest extends \PHPUnit_Framework_TestCase {
'___NREV',
'___NTREV',
'___USEREDITCNT',
'___USEREDITCNTNS',
'___USEREDITCNTNS',
'___EXIFDATA',
'___NSID',
'___NSNAME'
@ -122,7 +122,7 @@ class HookRegistryTest extends \PHPUnit_Framework_TestCase {
public function doTestRegisteredUpdateDataBeforeHandler( $instance ) {
$this->assertTrue(
$instance->isRegistered( 'SMWStore::updateDataBefore' )
$instance->isRegistered( 'SMW::Store::BeforeDataUpdateComplete' )
);
$store = $this->getMockBuilder( '\SMW\Store' )
@ -134,7 +134,7 @@ class HookRegistryTest extends \PHPUnit_Framework_TestCase {
->getMock();
$this->assertThatHookIsExcutable(
$instance->getHandlers( 'SMWStore::updateDataBefore' ),
$instance->getHandlers( 'SMW::Store::BeforeDataUpdateComplete' ),
[ $store, $semanticData ]
);
}