Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI for MW 1.42/43 #137

Merged
merged 5 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .github/.DS_Store
Binary file not shown.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ jobs:
database_image: "mariadb:11.2"
coverage: false
experimental: false
- mediawiki_version: '1.42'
smw_version: dev-master
php_version: 8.1
database_type: mysql
database_image: "mariadb:11.2"
coverage: false
experimental: false
- mediawiki_version: '1.43'
smw_version: dev-master
php_version: 8.1
database_type: mysql
database_image: "mariadb:11.2"
coverage: false
experimental: false

env:
MW_VERSION: ${{ matrix.mediawiki_version }}
Expand Down
19 changes: 3 additions & 16 deletions src/HookRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use SMW\DataTypeRegistry;
use SMW\DIWikiPage;
use SMWDataItem as DataItem;
use Hooks;

/**
* @license GNU GPL v2+
Expand Down Expand Up @@ -70,7 +69,7 @@ public function setOption( $key, $value ) {
* @return boolean
*/
public function isRegistered( $name ) {
return Hooks::isRegistered( $name );
return \MediaWiki\MediaWikiServices::getInstance()->getHookContainer()->isRegistered( $name );
}

/**
Expand All @@ -83,13 +82,7 @@ public function clear() {
}

foreach ( $this->handlers as $name => $callback ) {
if (
!class_exists( '\MediaWiki\MediaWikiServices' ) ||
!method_exists( \MediaWiki\MediaWikiServices::getInstance(), 'getHookContainer' ) ) {
\Hooks::clear( $name );
} else {
\MediaWiki\MediaWikiServices::getInstance()->getHookContainer()->clear( $name );
}
\MediaWiki\MediaWikiServices::getInstance()->getHookContainer()->clear( $name );
}
}

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

foreach ( $this->handlers as $name => $callback ) {
if (
!class_exists( '\MediaWiki\MediaWikiServices' ) ||
!method_exists( \MediaWiki\MediaWikiServices::getInstance(), 'getHookContainer' ) ) {
\Hooks::register( $name, $callback );
} else {
\MediaWiki\MediaWikiServices::getInstance()->getHookContainer()->register( $name, $callback );
}
\MediaWiki\MediaWikiServices::getInstance()->getHookContainer()->register( $name, $callback );
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class SciteTransclusionForCannedResponseParserTest extends \PHPUnit_Framework_TestCase {
class SciteTransclusionForCannedResponseParserTest extends \PHPUnit\Framework\TestCase {

/**
* @dataProvider crossrefFileProvider
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Structure/I18nJsonFileIntegrityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @author mwjames
*/
class I18nJsonFileIntegrityTest extends \PHPUnit_Framework_TestCase {
class I18nJsonFileIntegrityTest extends \PHPUnit\Framework\TestCase {

use PHPUnitCompat;

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Bibtex/BibtexAuthorListParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class BibtexAuthorListParserTest extends \PHPUnit_Framework_TestCase {
class BibtexAuthorListParserTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Bibtex/BibtexParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class BibtexParserTest extends \PHPUnit_Framework_TestCase {
class BibtexParserTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/Bibtex/BibtexProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class BibtexProcessorTest extends \PHPUnit_Framework_TestCase {
class BibtexProcessorTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/CacheKeyProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @author mwjames
*/
class CacheKeyProviderTest extends \PHPUnit_Framework_TestCase {
class CacheKeyProviderTest extends \PHPUnit\Framework\TestCase {

use PHPUnitCompat;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class CachedReferenceListOutputRendererTest extends \PHPUnit_Framework_TestCase {
class CachedReferenceListOutputRendererTest extends \PHPUnit\Framework\TestCase {

private $referenceListOutputRenderer;
private $contextInteractor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @author mwjames
*/
class CitationReferencePositionJournalTest extends \PHPUnit_Framework_TestCase {
class CitationReferencePositionJournalTest extends \PHPUnit\Framework\TestCase {

use PHPUnitCompat;

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/CitationResourceMatchFinderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class CitationResourceMatchFinderTest extends \PHPUnit_Framework_TestCase {
class CitationResourceMatchFinderTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @author mwjames
*/
class CitationTextChangeUpdateJobDispatcherTest extends \PHPUnit_Framework_TestCase {
class CitationTextChangeUpdateJobDispatcherTest extends \PHPUnit\Framework\TestCase {

private $store;
private $referenceBacklinksLookup;
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/CitationTextTemplateRendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class CitationTextTemplateRendererTest extends \PHPUnit_Framework_TestCase {
class CitationTextTemplateRendererTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @author mwjames
*/
class CitationReferenceValueTest extends \PHPUnit_Framework_TestCase {
class CitationReferenceValueTest extends \PHPUnit\Framework\TestCase {

private $dataValueServiceFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class ResourceIdentifierFactoryTest extends \PHPUnit_Framework_TestCase {
class ResourceIdentifierFactoryTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class ResourceIdentifierStringValueParserTest extends \PHPUnit_Framework_TestCase {
class ResourceIdentifierStringValueParserTest extends \PHPUnit\Framework\TestCase {

/**
* @dataProvider typeProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class ResourceIdentifierStringValueTest extends \PHPUnit_Framework_TestCase {
class ResourceIdentifierStringValueTest extends \PHPUnit\Framework\TestCase {

/**
* @dataProvider typeProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class BibliographicFilteredRecordTest extends \PHPUnit_Framework_TestCase {
class BibliographicFilteredRecordTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class CrossRefResponseParserTest extends \PHPUnit_Framework_TestCase {
class CrossRefResponseParserTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class HttpResponseParserFactoryTest extends \PHPUnit_Framework_TestCase {
class HttpResponseParserFactoryTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class NcbiPubMedResponseParserTest extends \PHPUnit_Framework_TestCase {
class NcbiPubMedResponseParserTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class OLResponseParserTest extends \PHPUnit_Framework_TestCase {
class OLResponseParserTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class OclcResponseParserTest extends \PHPUnit_Framework_TestCase {
class OclcResponseParserTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class ViafResponseParserTest extends \PHPUnit_Framework_TestCase {
class ViafResponseParserTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/HookRegistryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @author mwjames
*/
class HookRegistryTest extends \PHPUnit_Framework_TestCase {
class HookRegistryTest extends \PHPUnit\Framework\TestCase {

use PHPUnitCompat;

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/MediaWikiContextInteractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @author mwjames
* @reviewer thomas-topway-it
*/
class MediaWikiContextInteractorTest extends \PHPUnit_Framework_TestCase {
class MediaWikiContextInteractorTest extends \PHPUnit\Framework\TestCase {

use PHPUnitCompat;

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/MediaWikiNsContentMapperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class MediaWikiNsContentMapperTest extends \PHPUnit_Framework_TestCase {
class MediaWikiNsContentMapperTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/OptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class OptionsTest extends \PHPUnit_Framework_TestCase {
class OptionsTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/ParserFunctionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @author mwjames
*/
class ParserFunctionFactoryTest extends \PHPUnit_Framework_TestCase {
class ParserFunctionFactoryTest extends \PHPUnit\Framework\TestCase {

private $parser;

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/PreTextFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* @author mwjames
*/
class PreTextFormatterTest extends \PHPUnit_Framework_TestCase {
class PreTextFormatterTest extends \PHPUnit\Framework\TestCase {

use PHPUnitCompat;

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/PropertyRegistryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @author mwjames
*/
class PropertyRegistryTest extends \PHPUnit_Framework_TestCase {
class PropertyRegistryTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/ReferenceBacklinksLookupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @author mwjames
*/
class ReferenceBacklinksLookupTest extends \PHPUnit_Framework_TestCase {
class ReferenceBacklinksLookupTest extends \PHPUnit\Framework\TestCase {

use PHPUnitCompat;

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/ReferenceListFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @author mwjames
*/
class ReferenceListFactoryTest extends \PHPUnit_Framework_TestCase {
class ReferenceListFactoryTest extends \PHPUnit\Framework\TestCase {

private $store;
private $namespaceExaminer;
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/ReferenceListOutputRendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @author mwjames
*/
class ReferenceListOutputRendererTest extends \PHPUnit_Framework_TestCase {
class ReferenceListOutputRendererTest extends \PHPUnit\Framework\TestCase {

use PHPUnitCompat;

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/ReferenceListParserFunctionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @author mwjames
*/
class ReferenceListParserFunctionTest extends \PHPUnit_Framework_TestCase {
class ReferenceListParserFunctionTest extends \PHPUnit\Framework\TestCase {

use PHPUnitCompat;

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/Unit/SciteParserFunctionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @author mwjames
*/
class SciteParserFunctionTest extends \PHPUnit_Framework_TestCase {
class SciteParserFunctionTest extends \PHPUnit\Framework\TestCase {

use PHPUnitCompat;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class HtmlResponseParserRendererTest extends \PHPUnit_Framework_TestCase {
class HtmlResponseParserRendererTest extends \PHPUnit\Framework\TestCase {

public function testCanConstruct() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author mwjames
*/
class PageBuilderTest extends \PHPUnit_Framework_TestCase {
class PageBuilderTest extends \PHPUnit\Framework\TestCase {

private $htmlFormRenderer;
private $hmlColumnListRenderer;
Expand Down
Loading