Repository navigation
Restore per-sub-query map markers (#98) - #99
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #99 +/- ##
============================================
+ Coverage 29.56% 32.52% +2.95%
- Complexity 41 44 +3
============================================
Files 4 4
Lines 115 123 +8
============================================
+ Hits 34 40 +6
- Misses 81 83 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
SCQ attaches each sub-query's processed parameters to its result data items as a `display_options` field. Maps reads that field in QueryHandler::getLocationIcon() to render the custom marker (`icon`) and `legend label` configured for an individual #compound_query sub-query. 4.0.0 removed the producer (33cc6fb, #87) on the premise that nothing read `display_options`. Maps does, so custom markers stopped showing once a wiki upgraded to SCQ 4.0. Restore the assignment, extracted into attachDisplayOptions() so it can be unit tested. The PHP 8.2 dynamic-property deprecation that #87 fixed no longer applies: SCQ 4.x requires SMW >= 7.0, whose DataItem base class is marked `#[AllowDynamicProperties]`, so writing `display_options` to a result data item is deprecation-free.
alistair3149
force-pushed
the
restore-subquery-map-markers
branch
from
June 25, 2026 21:20
54bbafb to
5fc33da
Compare
alistair3149
marked this pull request as ready for review
June 25, 2026 21:29
Member
|
Did you verify this somehow? |
Member
Author
Contributor
Merged
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.




Problem
#compound_querylets each sub-query carry its own display parameters, including a per-sub-query map marker:After upgrading to SCQ 4.0 these custom markers stopped rendering — every result fell back to the default icon (#98).
Cause
SCQ attaches each sub-query's processed parameters to its result data items as a
display_optionsfield. Maps reads that field inQueryHandler::getLocationIcon()to pick theicon(andlegend label) for each marker:4.0.0 removed the only producer of that field (commit 33cc6fb, #87) on the premise that nothing read it. Maps does, so the markers disappeared.
Fix
Restore the assignment, extracted into an
attachDisplayOptions()helper so it can be unit tested. Each result data item again receives the sub-query's processed parameters asdisplay_options, and Maps picks up the per-sub-query icon.The PHP 8.2 dynamic-property deprecation that #87 set out to fix no longer applies: SCQ 4.x requires SMW >= 7.0, whose
DataItembase class is marked#[AllowDynamicProperties], so writingdisplay_optionsto a result data item is deprecation-free under every supported configuration.CompoundQueryResult::addResult()— the orphaned reader removed alongside the producer — stays removed; it has no callers.Testing
testAttachDisplayOptionsAddsOptionsToEveryResultasserts every result data item receives the sub-query parameters asdisplay_options.composer analyze(lint + PHPCS + minus-x) andcomposer phpunit(unit + integration, 63 tests) pass on MW 1.43 / SMW 7.x / PHP 8.1.🤖 Generated with Claude Code