Use namespaced Semantic MediaWiki classes#905
Closed
alistair3149 wants to merge 4 commits into
Closed
Conversation
CoordinateValue::getLongWikiText() registered the predefined tooltip head item via the `SMW_HEADER_TOOLTIP` constant, which Semantic MediaWiki 7.0 removed. Under PHP 8 the undefined constant raises a fatal error on every long-text or tooltip render of a coordinate value (factbox, #show, Special:Browse, query result popups). Load the tooltip resource modules directly instead, matching how Semantic MediaWiki 7 itself loads them, and add a regression test for the long text and tooltip output.
The CI install only loaded Maps, so every test guarded on Semantic MediaWiki being present self-skipped and the entire Semantic MediaWiki integration went unverified. Add an optional Semantic MediaWiki argument to the install script (loaded before Maps, with its schema set up) and a matrix row that installs Semantic MediaWiki 7, so those tests actually run.
Replace the deprecated global Semantic MediaWiki class aliases (SMWDataValue, SMWDIGeoCoord, SMWDataItem, SMWOutputs, SMWDIContainer, SMWDIBlob, SMWWikiPageValue, SMWRecordValue) and the deprecated namespaced aliases (SMW\DIProperty, SMW\DIWikiPage) with their Semantic MediaWiki 7 canonical namespaced classes. These aliases are deprecated in Semantic MediaWiki 7 and slated for removal, and Semantic Maps already requires Semantic MediaWiki 7.
Member
Author
|
Consolidated into #904 — the namespace modernization now rides in the single 12.1.6 Semantic MediaWiki 7 PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First piece of the 13.0.0 cycle (Semantic MediaWiki 7 only).
What
Replaces every deprecated Semantic MediaWiki class alias Maps used with its SMW 7 canonical namespaced class:
SMWDataValue→SMW\DataValues\DataValue,SMWDIGeoCoord→SMW\DataItems\GeoCoord,SMWDataItem→SMW\DataItems\DataItem,SMWOutputs→SMW\MediaWiki\Outputs,SMWDIContainer→SMW\DataItems\Container,SMWDIBlob→SMW\DataItems\Blob,SMWWikiPageValue→SMW\DataValues\WikiPageValue,SMWRecordValue→SMW\DataValues\RecordValue.SMW\DIProperty→SMW\DataItems\Property,SMW\DIWikiPage→SMW\DataItems\WikiPage.useimports;@seedocblocks point at the canonical classes.These aliases are
@deprecatedin Semantic MediaWiki 7 and slated for removal in a future major. Semantic Maps already requires Semantic MediaWiki 7 (the 12.1.x line uses SMW-7-only APIs such asSMW\EventDispatcher\EventDispatcherandSMWOutputs::requireStyle()), so this is internal cleanup with no behavior change.Verification
Against MediaWiki 1.43 + Semantic MediaWiki 7.0: full suite
OK (265 tests, 449 assertions); every renamed class resolves; no new PHPCS violations under Maps' ruleset.Notes