Conversation
Drops it similar to SMW to speed up.
* Add CI for MW 1.43+ and remove MW 1.39 * Update extension.json * Update ci.yml * Update ci.yml * Update GalleryTest.php * Update TreeTest.php * Update TreeResultPrinter.php * Update TreeTest.php * Update SRF_Dygraphs.php * Update Carousel.php * Update MediaPlayer.php * Update SRF_Calendar.php * Update SRF_JitGraph.php * Update SRF_SlideShowApi.php * Update SpreadsheetPrinter.php * Update SRF_Process.php * Update MapView.php * Update SRF_D3Chart.php * Update TagCloud.php * Update Filtered.php * Update SRF_Timeline.php * Update SRF_Incoming.php * Update SRF_SlideShow.php * Update GraphFormatter.php * Update EventCalendar.php * Update Gallery.php * Update GanttPrinter.php * Update SRF_Dygraphs.php * Update SemanticResultFormats.utils.php * Update SRF_PageWidget.php * Update TableView.php * Update SRF_Boilerplate.php * Update SRF_jqPlotChart.php * Update SRF_Timeseries.php * Update GraphPrinter.php * Update SRF_Sparkline.php * Update DataTables.php * Update SRF_jqPlotSeries.php * Update SRF_ListWidget.php * Update SRF_ValueRank.php * Update GalleryTest.php * Update ValueRankTest.php * Update ListTreeBuilderTest.php * Update ResourceFormatterTest.php * Update TemplateBuilderTest.php * Update OutlineResultPrinterTest.php * Update I18nJsonFileIntegrityTest.php * Update JsonTestCaseScriptRunnerTest.php * Update BibTexFileExportPrinter.php * Update BibTexFileExportPrinter.php * Fix * Update ci.yml * Update ci.yml * Fix * Fix
With the droppage of MW 1.39 and the requirement of at least MW 1.43+ now. Let's bump the version to 6.0.0.
* do not include ext.srf.filtered.leaflet.js see SemanticMediaWiki#976 * add stripHtml * Add files via upload add compiled
* Create af.json * add i18n files * add i18n plugins * use language plugins * fix retrieve language lowercase * improve retrieve language * fix comment * fix closure * improve retrieveLanguage
…izeCfgValue fallback (SemanticMediaWiki#1005) Closes SemanticMediaWiki#1004
- Add XML declaration and schema reference (phpunit.de/9.6) - Remove deprecated attributes: backupStaticAttributes, cacheTokens - Replace <filter><whitelist> with <coverage><include>
* chore(qa): add Phan static analysis - Add mediawiki/mediawiki-phan-config 0.14.0 to require-dev - Add phan Composer script (--allow-polyfill-parser) - Add .phan/config.php covering formats/ and src/ - Add initial .phan/baseline.php capturing all existing violations - Add composer-phan Makefile target - Add Phan step to coverage job in ci.yml Closes SemanticMediaWiki#1006 * fix(ci): exclude auto-generated .phan/baseline.php from PHPCS
…emanticMediaWiki#1010) (SemanticMediaWiki#1011) Base class View::getJsDataForRow() returned null in the implementation but subclasses (CalendarView, MapView) widen the return type to array|null. Correct the @return docblock on the base class to array|null so Phan no longer flags the signature mismatch in CalendarView.
MediaWiki's evolution of its gallery HTML structure forces SRF to adapt. MediaWiki has adopted a "mw-file-description" HTML class as more semantic and specific for file description links in gallery displays. It replaces the former, generic, "image" class applied to the same elements. So, Semantic Result Formats - Gallery output needs to adapt specifically in its "overlay" and "redirect" options because they relied upon the old HTML output of MediaWiki. - modifies the JavaScript files for overlay and redirect - Adds QUnit tests for overlay and redirect with assertions about the HTML - Fixup to the 'fancybox' jQuery module (without upgrading) If running this in a containerized / development environment, you can test only gallery-related functionality "cd /var/www/html/extensions/SemanticResultFormats && composer phpunit -- --filter Gallery" Fixes Issue SemanticMediaWiki#940 with explanation by @ADB-Linux
…iaWiki#1012) (SemanticMediaWiki#1013) Replace weak == comparisons with strict === in Gallery.php: - widget param: == 'carousel' / == 'slideshow' -> === - class/widget ternary truthiness -> !== '' - overlay param: == true -> direct boolean - getNamespace() == NS_FILE -> === - gettype($ig->mParser) == "object" -> is_object() - empty($imgCaption) -> $imgCaption === '' + remove dead else branch Add PHPUnit tests covering the carousel, slideshow, overlay and custom-class code paths.
…nPluginSimplifyExpressionBool in DataTables (SemanticMediaWiki#1014) (SemanticMediaWiki#1015) - data-nocase: $x === $y ? true : false -> direct boolean expression - getPrintoutsOptions 'number' case: $value * 1 -> (float)$value Add JSONScript integration test (datatables-02.json) covering the number/boolean printout parameter casting code paths.
…des (SemanticMediaWiki#1017) - Replace assertEmpty() with assertSame([], ...) in OutlineTreeTest - Move inline comments to their own line in SRF_Array, QuerySegmentListProcessor, SRF_Process - Remove MediaWiki.PHPUnit.AssertEmpty.AssertEmptyUsed exclude - Remove MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment exclude Closes SemanticMediaWiki#1016
…oltip.add() (SemanticMediaWiki#779, SemanticMediaWiki#1018) (SemanticMediaWiki#1020) * test(dygraphs): add JSONScript integration test and fix AssignmentInCondition (SemanticMediaWiki#1018) * fix(dygraphs): replace deprecated tooltip.add() with tippy-compatible DOM injection (SemanticMediaWiki#779) * fix(utils): drop deprecated DummyLinker/Linker, pass null to getText()
…spreadsheet, jqplot, googlecharts, dataframe, prolog + CI bump (SemanticMediaWiki#1018) (SemanticMediaWiki#1021) * fix(calendar): remove mFirstCall dead code, simplify getParser() usage * test(formats): add JSONScript integration tests for array, calendar, spreadsheet, jqplot, googlecharts, dataframe, prolog (SemanticMediaWiki#1018) * chore(ci): bump SMW_VERSION to dev-master, add spreadsheet install step SMW 6.0.1 has a bug where #ask returns empty results in the prepareContentForEdit context used by JSONScript parser-type tests. Fixed in dev-master; pin to 7.x once released. * chore(ci): enable googlebar/googlepie in __setup_extension__ for integration tests * fix(spreadsheet): add null guard for CellIterator::current() (phan PhanTypeMismatchArgumentNullable)
…diaWiki#1018) (SemanticMediaWiki#1022) * fix(phpcs): resolve AssignmentInCondition global excludes (SemanticMediaWiki#1018) - Rewrite while-assignment loops in tested formats (array, spreadsheet, jqplot, googlecharts, dataframe, calendar, prolog) to use explicit pre-condition assignment pattern - Add phpcs:ignore per-line for untested formats (gallery, Gantt, timeseries, tagcloud, JitGraph, datatables, time, boilerplate, valuerank, timeline, filtered, tree, media, math) and src/ classes (Outline, BibTex, iCalendar, Graph, vCard) - Remove global excludes FoundInWhileCondition and Found from .phpcs.xml * fix(phan): resolve PhanUndeclaredVariable errors in JitGraph and MediaPlayer - Initialize $firstcol = true at start of each row iteration in SRF_JitGraph - Initialize $rowData = [] before inner while loop in MediaPlayer - Add dev-test and .git-safe-dir targets aligned with PageForms - Hook composer-phan into ci-coverage target
SemanticMediaWiki#1023) * fix(ci): install symfony/css-selector to enable parser-html JSONScript tests SMW declares symfony/css-selector in require-dev, but MediaWiki's composer-merge-plugin runs with merge-dev: false, so SMW's dev dependencies are never installed into the shared MW vendor. This causes HtmlValidator::canUse() to return false, marking all "type": "parser-html" test cases as incomplete (∅). Add install-html-validator Makefile target (parallel to install-spreadsheet) that installs symfony/css-selector via composer.local.json. Chain it into the install target so it runs after every make install. Effect: filtered-01.json (18 tests, 55 assertions) and filtered-02.json (1 test, 8 assertions) now execute fully. Also unblocks gantt-01/02, tree-01/02/04/06/07, gallery-03, listwidget-01, valuerank-01. * fix(filtered): NumberFilter accepted all property types due to missing === comparison isValidFilterForPropertyType() contained `|| '_dat'` instead of `|| $typeID === '_dat'`. A non-empty string is always truthy in PHP, so the filter was accepted for every property type (e.g. _txt, _wpg). Add NumberFilterTest with cases for _num, _qty, _dat (true) and _txt, _wpg (false) to document and guard the correct behaviour. * fix(filtered): ResultItem::getData() triggers undefined array key on missing id getData() accessed $this->mItemData[$viewOrFilterId] directly. On PHP 8.x this throws an "Undefined array key" error when the key has not been set (e.g. after unsetData() or for a new item). Fix: use null-coalescing operator (?? null). Add three tests to ResultItemTest: getData on unset key, on set value, and after explicit unsetData().
…Wiki#1025) * refactor(filtered): cleanup dead code and style issues (SemanticMediaWiki#1024) F-03: remove duplicate SMWOutputs::requireResource call and redundant registerResources([], [...]) in Filtered::getResultText() F-06: simplify $GLOBALS access in MapView getters using ?? operator; fix @param null docblocks on setMapProvider/setMapProviderDark to correctly declare string type F-10/F-11: remove dead commented-out code blocks in CalendarView (ListView copy-paste remnant in handleParameters, stale wikitext debug line in getJsDataForRow) F-14: replace array_map side-effect with foreach in Filtered::registerResourceModules() F-16: remove obsolete 'return true' from Hooks handlers (MW 1.35+ ignores boolean hook return values) * fix(phpcs): remove blank line before closing brace in CalendarView::handleParameters()
…stView (F-12) (SemanticMediaWiki#1031) * refactor(filtered): lazy-init handleParameters() via null-guard in ListView (F-12) * fix(filtered): extract $mSep property to resolve Phan nullable array-access warnings (F-12)
…MediaWiki#1035) * Fix support for SMW 7.x in SRFSlideShow::linkFurtherResults Fixes SemanticMediaWiki#1034 * Fix alt attribute handling for image in Carousel
|
Important Review skippedToo many files! This PR contains 199 files, which is 49 over the limit of 150. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (199)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Member
Author
|
@copilot resolve the merge conflicts in this pull request, delete build folder. |
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.
No description provided.