What is the problem?
In T238466, the (Default)PreferencesFactory::setUser() method was removed.
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()