Skip to content

Support Semantic MediaWiki 7.0#89

Merged
paladox merged 1 commit into
masterfrom
support-smw-7.0
Jun 2, 2026
Merged

Support Semantic MediaWiki 7.0#89
paladox merged 1 commit into
masterfrom
support-smw-7.0

Conversation

@alistair3149

Copy link
Copy Markdown
Member

Summary

Adds support for Semantic MediaWiki 7.0 and realigns the major version with SMW (3.x7.0.0-alpha; versions 4.x6.x are skipped to match SMW's major). Minimum requirements are raised to MediaWiki 1.43, Semantic MediaWiki 7.0, and PHP 8.1.

SMW 7.0 compatibility

  • SMW\MediaWiki\Api\Query::__construct() now requires a third QuerySourceFactory argument. The compoundquery API module (a subclass of that base) is now registered with the SMW.QuerySourceFactory service via an ObjectFactory spec, mirroring how SMW registers its own ask/askargs modules.
  • Updated SMW deprecated class aliases to their 7.0 names: SMWQuerySMW\Query\Query, SMWQueryProcessorSMW\Query\QueryProcessor.

Code modernisation

  • MediaWiki-namespaced imports (MediaWiki\Parser\Parser, MediaWiki\Api\ApiBase, MediaWiki\Api\ApiFormatXml); replaced inline fully-qualified names with use imports.
  • SPDX license identifiers (GPL-2.0-or-later) and PHP 8.1 native types where code was touched.

Tooling & CI

  • composer.json: PHP >= 8.1; mediawiki-codesniffer, minus-x, parallel-lint; analyze/test/unit/integration/phpcs-fix scripts; branch-alias 7.0.0-dev. Added a .phpcs.xml ruleset.
  • GitHub Actions matrix: MediaWiki 1.43–1.45 × PHP 8.1–8.4 against SMW dev-master, each row on a distinct currently-supported MariaDB LTS (10.11 / 11.4 / 11.8 / 12.3); actions/checkout@v6, codecov/codecov-action@v6. Codecov project/patch checks are informational so coverage deltas do not gate CI.
  • Removed the obsolete Travis and Scrutinizer configuration.

Testing

composer analyze (parallel-lint + PHPCS + minus-x) is clean and composer phpunit passes (62 tests, 120 assertions) against SMW dev-master on MediaWiki 1.43 / PHP 8.1.

@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 36.36364% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.35%. Comparing base (29a7a60) to head (182969c).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/CompoundQueryProcessor.php 12.50% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master      #89   +/-   ##
=========================================
  Coverage     26.35%   26.35%           
  Complexity       48       48           
=========================================
  Files             3        3           
  Lines           129      129           
=========================================
  Hits             34       34           
  Misses           95       95           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Realign the major version with Semantic MediaWiki (3.x -> 7.0.0-alpha;
versions 4.x-6.x are skipped) and raise the minimum requirements to
MediaWiki 1.43, Semantic MediaWiki 7.0 and PHP 8.1.

* Fix the compoundquery API module for SMW 7.0: SMW\MediaWiki\Api\Query
  now requires a QuerySourceFactory constructor argument, so register the
  module with the SMW.QuerySourceFactory service instead of a bare class
  name.
* Adopt MediaWiki-namespaced imports (MediaWiki\Parser\Parser,
  MediaWiki\Api\ApiBase, MediaWiki\Api\ApiFormatXml) and SMW 7.0 class
  names (SMW\Query\Query, SMW\Query\QueryProcessor); drop inline FQN.
* Modernise the toolchain: mediawiki-codesniffer, minus-x and
  parallel-lint with composer analyze/test/unit/integration/phpcs-fix
  scripts, plus a .phpcs.xml ruleset; bring src/ and tests into
  compliance and use SPDX license identifiers.
* Rework CI for MediaWiki 1.43-1.45 and PHP 8.1-8.4 with a per-version
  MariaDB LTS spread (10.11/11.4/11.8/12.3); remove the obsolete Travis
  and Scrutinizer configuration.
* Make Codecov project/patch status checks informational so coverage
  deltas do not gate CI.
@alistair3149 alistair3149 marked this pull request as ready for review June 2, 2026 20:23
@alistair3149 alistair3149 requested a review from paladox June 2, 2026 20:23
@paladox paladox merged commit fdd730a into master Jun 2, 2026
7 checks passed
@paladox paladox deleted the support-smw-7.0 branch June 2, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants