-
-
Notifications
You must be signed in to change notification settings - Fork 10
Fixes of newer MediaWiki and SMW versions #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
013b35f to
d718e76
Compare
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
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.
|
Thanks for fixing CI in #125 |
| } | ||
|
|
||
| function rewind() { | ||
| function rewind(): void { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
|
@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) |
|
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. |
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