Skip to content

Commit 215f7aa

Browse files
authored
Add CI for MW 1.42/43 (#137)
* Add CI for MW 1.42/43 * Delete .github/.DS_Store * Update HookRegistry.php * Update HookRegistry.php * Fix
1 parent 00d5f1f commit 215f7aa

40 files changed

+54
-53
lines changed

.github/.DS_Store

-6 KB
Binary file not shown.

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ jobs:
4545
database_image: "mariadb:11.2"
4646
coverage: false
4747
experimental: false
48+
- mediawiki_version: '1.42'
49+
smw_version: dev-master
50+
php_version: 8.1
51+
database_type: mysql
52+
database_image: "mariadb:11.2"
53+
coverage: false
54+
experimental: false
55+
- mediawiki_version: '1.43'
56+
smw_version: dev-master
57+
php_version: 8.1
58+
database_type: mysql
59+
database_image: "mariadb:11.2"
60+
coverage: false
61+
experimental: false
4862

4963
env:
5064
MW_VERSION: ${{ matrix.mediawiki_version }}

src/HookRegistry.php

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use SMW\DataTypeRegistry;
99
use SMW\DIWikiPage;
1010
use SMWDataItem as DataItem;
11-
use Hooks;
1211

1312
/**
1413
* @license GNU GPL v2+
@@ -70,7 +69,7 @@ public function setOption( $key, $value ) {
7069
* @return boolean
7170
*/
7271
public function isRegistered( $name ) {
73-
return Hooks::isRegistered( $name );
72+
return \MediaWiki\MediaWikiServices::getInstance()->getHookContainer()->isRegistered( $name );
7473
}
7574

7675
/**
@@ -83,13 +82,7 @@ public function clear() {
8382
}
8483

8584
foreach ( $this->handlers as $name => $callback ) {
86-
if (
87-
!class_exists( '\MediaWiki\MediaWikiServices' ) ||
88-
!method_exists( \MediaWiki\MediaWikiServices::getInstance(), 'getHookContainer' ) ) {
89-
\Hooks::clear( $name );
90-
} else {
91-
\MediaWiki\MediaWikiServices::getInstance()->getHookContainer()->clear( $name );
92-
}
85+
\MediaWiki\MediaWikiServices::getInstance()->getHookContainer()->clear( $name );
9386
}
9487
}
9588

@@ -114,13 +107,7 @@ public function register() {
114107
//}
115108

116109
foreach ( $this->handlers as $name => $callback ) {
117-
if (
118-
!class_exists( '\MediaWiki\MediaWikiServices' ) ||
119-
!method_exists( \MediaWiki\MediaWikiServices::getInstance(), 'getHookContainer' ) ) {
120-
\Hooks::register( $name, $callback );
121-
} else {
122-
\MediaWiki\MediaWikiServices::getInstance()->getHookContainer()->register( $name, $callback );
123-
}
110+
\MediaWiki\MediaWikiServices::getInstance()->getHookContainer()->register( $name, $callback );
124111
}
125112
}
126113

tests/phpunit/Integration/FilteredMetadata/SciteTransclusionForCannedResponseParserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @author mwjames
1515
*/
16-
class SciteTransclusionForCannedResponseParserTest extends \PHPUnit_Framework_TestCase {
16+
class SciteTransclusionForCannedResponseParserTest extends \PHPUnit\Framework\TestCase {
1717

1818
/**
1919
* @dataProvider crossrefFileProvider

tests/phpunit/Structure/I18nJsonFileIntegrityTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* @author mwjames
1616
*/
17-
class I18nJsonFileIntegrityTest extends \PHPUnit_Framework_TestCase {
17+
class I18nJsonFileIntegrityTest extends \PHPUnit\Framework\TestCase {
1818

1919
use PHPUnitCompat;
2020

tests/phpunit/Unit/Bibtex/BibtexAuthorListParserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @author mwjames
1515
*/
16-
class BibtexAuthorListParserTest extends \PHPUnit_Framework_TestCase {
16+
class BibtexAuthorListParserTest extends \PHPUnit\Framework\TestCase {
1717

1818
public function testCanConstruct() {
1919

tests/phpunit/Unit/Bibtex/BibtexParserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @author mwjames
1515
*/
16-
class BibtexParserTest extends \PHPUnit_Framework_TestCase {
16+
class BibtexParserTest extends \PHPUnit\Framework\TestCase {
1717

1818
public function testCanConstruct() {
1919

tests/phpunit/Unit/Bibtex/BibtexProcessorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @author mwjames
1515
*/
16-
class BibtexProcessorTest extends \PHPUnit_Framework_TestCase {
16+
class BibtexProcessorTest extends \PHPUnit\Framework\TestCase {
1717

1818
public function testCanConstruct() {
1919

tests/phpunit/Unit/CacheKeyProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* @author mwjames
1616
*/
17-
class CacheKeyProviderTest extends \PHPUnit_Framework_TestCase {
17+
class CacheKeyProviderTest extends \PHPUnit\Framework\TestCase {
1818

1919
use PHPUnitCompat;
2020

tests/phpunit/Unit/CachedReferenceListOutputRendererTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @author mwjames
1515
*/
16-
class CachedReferenceListOutputRendererTest extends \PHPUnit_Framework_TestCase {
16+
class CachedReferenceListOutputRendererTest extends \PHPUnit\Framework\TestCase {
1717

1818
private $referenceListOutputRenderer;
1919
private $contextInteractor;

0 commit comments

Comments
 (0)