What is the problem?
In T238466, the (Default)PreferencesFactory::setUser() method was removed.
It is currently used here by TheWikipediaLibrary Extension.
Therefore, at the moment, the notification will fail to appear when it should (and there will be an exception in the logs).
I believe the solution is:
- Remove the use of setUser()
- Instead, pass the $user object to the methods getGlobalPreferencesValues() and setGlobalPreferences()
Steps to reproduce problem
- On a wiki with TheWikipediaLibrary installed, modify the LocalSettings.php with:
$wgTwlSendNotifications = true; $wgTwlEditCount = 1; $wgTwlRegistrationDays = 1;
(You could probably set them to 0 instead, if necessary)
- Login as a user and perform any edit
Expected behavior: You see an echo notification welcoming you to The Wikipedia Library (you might need to refresh the page)
Observed behavior: You see no notification. The logs have an error of the form: Call to undefined method GlobalPreferences\GlobalPreferencesFactory::setUser()
Environment
Wiki(s): TheWikipediaLibrary 1.0.0 (3d27d28) 02:47, 2 June 2020; MediaWiki 1.35.0-alpha (abf2cf3); GlobalPreferences 0.1.2 (227b187) 00:38, 9 June 2020