Skip to content

Conversation

@DanielWTQ
Copy link
Contributor

Replace SMW aliases that were removed in SMW 5, replace use of wfGetDB(), add missing __METHOD__ to database calls, avoid writing directly to $wgHooks, and other cleanup

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 27.77778% with 117 lines in your changes missing coverage. Please review.
✅ Project coverage is 10.61%. Comparing base (7ae92f7) to head (a55de72).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/ChangeSet.php 0.00% 40 Missing ⚠️
src/Group.php 0.00% 19 Missing ⚠️
src/Edit.php 0.00% 18 Missing ⚠️
src/Groups.php 0.00% 16 Missing ⚠️
src/PropertyChanges.php 0.00% 9 Missing ⚠️
src/Special/Watchlist.php 0.00% 7 Missing ⚠️
src/CustomTexts.php 0.00% 4 Missing ⚠️
src/Emailer.php 0.00% 2 Missing ⚠️
src/HookRegistry.php 97.82% 1 Missing ⚠️
src/PropertyChange.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #124      +/-   ##
============================================
- Coverage     10.69%   10.61%   -0.09%     
  Complexity      429      429              
============================================
  Files            22       22              
  Lines          1683     1724      +41     
============================================
+ Hits            180      183       +3     
- Misses         1503     1541      +38     

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Replace SMW aliases that were removed in SMW 5, replace use of wfGetDB(), add
missing `__METHOD__` to database calls, avoid writing directly to `$wgHooks`,
and other cleanup.
@DanielWTQ
Copy link
Contributor Author

Thanks for fixing CI in #125
Tests now all pass with the updated code, and the deprecation warnings were also removed

}

function rewind() {
function rewind(): void {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the type declaration intentional? If so, what's the reasoning behind adding them specifically to these functions? I'm curious about the decision-making process for including them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compatibility with the iterator interface, otherwise there are warnings
For next() I added #[\ReturnTypeWillChange] because the existing code doesn't match the return type that should be used for the interface, but for the other interface methods it already matched and so we could just add the return type
See https://wiki.php.net/rfc/internal_method_return_types and the docs at https://www.php.net/manual/en/class.iterator.php

@DanielWTQ
Copy link
Contributor Author

@alistair3149 @paladox anything I can do to make this easier to review? (Not trying to nag, just want to make sure you aren't waiting for something more from me)

@paladox paladox merged commit 3b55e9b into SemanticMediaWiki:master Nov 6, 2025
7 checks passed
@paladox
Copy link
Contributor

paladox commented Nov 6, 2025

array() should probably be changed to [] but that's a code style issue and can be done in another commit so this looks good to me.

@DanielWTQ DanielWTQ deleted the fixes branch November 6, 2025 21:18
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.

3 participants