Skip to content

Support Semantic MediaWiki 7.0#112

Merged
paladox merged 4 commits into
masterfrom
support-smw-7.0
Jun 4, 2026
Merged

Support Semantic MediaWiki 7.0#112
paladox merged 4 commits into
masterfrom
support-smw-7.0

Conversation

@alistair3149

Copy link
Copy Markdown
Member

Summary

Adds support for Semantic MediaWiki 7.0 and raises Semantic Meta Tags to 7.0.0-alpha. Following the convention for these extensions, the major version tracks the supported Semantic MediaWiki major directly (jumping from 4.x, skipping 5.x and 6.x).

Changes

Requirements & version

  • extension.json: version7.0.0-alpha (requirements already declared MediaWiki >= 1.43 and Semantic MediaWiki >= 7.0.0).
  • composer.json: branch-alias.dev-master7.0.0-dev.
  • RELEASE-NOTES.md: new 7.0.0-alpha entry.

Source migration (Semantic MediaWiki 7.0 API)

  • Migrate Semantic MediaWiki's deprecated data-item class aliases to their canonical 7.0 namespaces, in both production code and test mocks:
    • SMW\DIPropertySMW\DataItems\Property
    • SMW\DIWikiPageSMW\DataItems\WikiPage
    • SMWDIBlobSMW\DataItems\Blob
    • SMWDIUriSMW\DataItems\Uri
    • SMW\SemanticDataSMW\DataModel\SemanticData
  • Replace the inline \OutputPage reference with the namespaced MediaWiki\Output\OutputPage.
  • The two registered hooks (BeforePageDisplay, OutputPageParserOutput) are MediaWiki-core hooks and remain valid in MW 1.43+. The extension registers no Semantic MediaWiki hooks, so SMW 7.0's hook renames do not affect it.

CI & tooling

  • main.yml: per-row MariaDB LTS spread (10.11 / 11.4 / 11.8 / 12.3) across MediaWiki 1.43–1.45 and PHP 8.1–8.4; bump actions/checkout and codecov/codecov-action to v6.
  • codecov.yml: project + patch coverage status set to informational so coverage never gates CI.
  • Add unit / integration composer scripts.
  • Remove dead legacy CI: .scrutinizer.yml, tests/travis/, and the orphaned phpmd.xml.

Bug fix (separate commit)

  • JsonLDSerializer referenced an undeclared self::$Logger in its EasyRdf catch branch, so any EasyRdf failure during JSON-LD generation raised an "undeclared static property" Error on a normal page view instead of degrading gracefully. The message is now routed through MediaWiki's LoggerFactory.

Security policy (separate commit)

  • Add SECURITY.md documenting private vulnerability reporting. This is unrelated to the version bump, so it is kept as its own commit.

Verification

Run in the docker-compose-ci stack (MediaWiki 1.43 + Semantic MediaWiki dev-master + MariaDB 11.8):

  • composer analyze — clean (lint + PHPCS + minus-x, exit 0, no warnings).
  • composer phpunit — 80 tests, 160 assertions, OK (including the database-backed integration tests).
  • Live smoke test on a real page view (index.php, not action=parse, since this extension injects content at page-display time): the property-derived <meta name="keywords"> / <meta name="description"> tags and the JSON-LD <script type="application/ld+json"> block all render correctly with no PHP errors.

Require Semantic MediaWiki 7.0 and raise the extension to 7.0.0-alpha; the
major version now tracks the supported SMW major (skipping 5.x and 6.x).

Migrate Semantic MediaWiki's deprecated data-item class aliases to their
canonical 7.0 namespaces (SMW\DataItems\{Property,WikiPage,Blob,Uri} and
SMW\DataModel\SemanticData) in both production code and test mocks.

Refresh CI to a per-row MariaDB LTS spread (10.11/11.4/11.8/12.3) across
MediaWiki 1.43-1.45 and PHP 8.1-8.4, bump actions/checkout and
codecov-action to v6, and make coverage status informational so it never
gates CI.

Remove dead legacy CI: .scrutinizer.yml, tests/travis, and the orphaned
phpmd.xml.
The EasyRdf catch branch referenced an undeclared `self::$Logger`, so any
EasyRdf failure during JSON-LD generation raised an "undeclared static
property" Error on a normal page view instead of degrading gracefully.
Route the message through MediaWiki's LoggerFactory instead.
Document how to report vulnerabilities privately via GitHub private
vulnerability reporting, the disclosure process, and where to report issues
that actually belong to MediaWiki or Semantic MediaWiki.
@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.43%. Comparing base (94bcc9a) to head (aa15344).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/JsonLDSerializer.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master     #112   +/-   ##
=========================================
  Coverage     82.43%   82.43%           
  Complexity       80       80           
=========================================
  Files             7        7           
  Lines           205      205           
=========================================
  Hits            169      169           
  Misses           36       36           

☔ View full report in Codecov by Harness.
📢 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.

@alistair3149 alistair3149 requested a review from paladox June 4, 2026 17:11
@alistair3149 alistair3149 marked this pull request as ready for review June 4, 2026 17:11
Comment thread composer.json Outdated
@paladox paladox merged commit 2eecb7d into master Jun 4, 2026
4 checks passed
@paladox paladox deleted the support-smw-7.0 branch June 4, 2026 17:33
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