Remove obsolete SMW version checks#93
Merged
Merged
Conversation
The extension requires SemanticMediaWiki >= 7.0, so the version_compare( SMW_VERSION, '1.6.1'/'1.7.2', '>' ) guards in CompoundQueryProcessor are always true. Drop the dead branches and keep the code paths that always ran: unwrap the addThisPrintout() / getProcessedParams() calls, collapse the format lookup in getResultFromQueryResult() to $params['format']->getValue(), and remove its unreachable pre-1.6.1 else branch.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #93 +/- ##
============================================
+ Coverage 28.57% 30.08% +1.51%
+ Complexity 44 40 -4
============================================
Files 3 3
Lines 119 113 -6
============================================
Hits 34 34
+ Misses 85 79 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
The extension now requires SemanticMediaWiki
>= 7.0(seeextension.json), so theversion_compare( SMW_VERSION, '1.6.1', '>' )andversion_compare( SMW_VERSION, '1.7.2', '>' )guards inCompoundQueryProcessorare always true on every supported version. This removes the dead branches and keeps the code paths that always executed:queryAndMergeResults()andgetQueryResultFromQueryString(): unwrap the always-trueaddThisPrintout()/getProcessedParams()calls.getResultFromQueryResult(): collapse the format lookup to$params['format']->getValue()and drop the unreachable pre-1.6.1elsebranch (which calledgetResultFormat(), no longer present in SMW 7.0).This is dead-code removal only — no behavior change on any supported SMW version, so there is no release-notes entry.
The
!defined( 'SMW_VERSION' )presence guard inSemanticCompoundQueries.phpis intentionally left in place: it checks that Semantic MediaWiki is loaded at all, which is a different concern from the version comparisons removed here.🤖 Generated with Claude Code