Update plugin for compatability with mediawiki 1.33+ - #18
Conversation
…s array offset on value of type null \n Color.php: PHP Warning: Invalid argument supplied for foreach() on example, fix localization and extention.json
|
Is this still compatible with 1.32? Or was the old version compatible with 1.33? I did look into upgrading to 1.33 briefly, and I could have sworn our extensions ran on it unmodified... |
|
I guess this loader may work with any version starting from 1.29 (minimal version for manifest v2), version 1.33 was taken from manifest example, but i`m think i did not use any keywords that really depends on 1.33. Actually in this case i dont even check this, target was bring wiki and plugins to current LTS 1.35 and made them available via new loader, to unify wiki plugin loading process without modification in nixos mediawiki service to make easier future support. This pull requst should not bring any functional changes, so you can ignore him if you dont need it. |
| @@ -1,275 +1,272 @@ | |||
| <?php | |||
|
|
|||
| $DFCharacters = array( | |||
There was a problem hiding this comment.
Also, is there a requirement to move these into classes now, or is that just a stylistic preference?
There was a problem hiding this comment.
I encounter problem that cause null pointer error when access this array, i`m not php programmer so just move them in class where they will be guaranteed in function scope.
There was a problem hiding this comment.
Error was mentioned in commit message
Avoid using globals to fix: Color.php: PHP Notice: Trying to access array offset on value of type null \n Color.php: PHP Warning: Invalid argument supplied for foreach() on example
This may or may be not related to php74
There was a problem hiding this comment.
Huh, yeah, could be related to a PHP upgrade or MW invoking code at a different time.
Current option code not compatible with mw 1.40 $user->getOption been removed in favor userOptionsLookup->getOption Need a bit more digging for proper solution, but shall work for now
Commits that made plugin work on dfwk.ru